如题:现在界面上有两个<input type="text" id="txt1"> <input type="text" id="txt2">
当打开页面时我想为两个文本框赋当前时间和当前时间的前三天的初始值 请问该怎样实现?
麻烦高手们把代码帮忙写一下记住是前台不是后台!!! 谢谢
当打开页面时我想为两个文本框赋当前时间和当前时间的前三天的初始值 请问该怎样实现?
麻烦高手们把代码帮忙写一下记住是前台不是后台!!! 谢谢
解决方案 »
- [100分]坚持打造最好的日期控件,My97 DatePicker 4.7 Release
- 统计某列值相同的数量
- 请问大家设计aspx页面,都用什么工具呀?
- 再问:用户自定义控件动态赋值
- 请问:在Asp.net中有没有必要关心多核编程中的负载平衡问题?
- 经过路由器,如何从internet网上访问另一个城市的的一台电脑的局域网的SQL SERVER?能否提供端口映射和VPN的详细细节吗?
- 急问!!! 来者有分!!!!
- url字符转义
- 单击webcontrol的button后,如何在弹出一个新的窗口,指向我新的URI?
- 我将用户IUSR_AKUAN的密码改为空了,结果WEB不能正常浏览了,非要输入用户名和密码,求救!
- MVC简单问题
- 后台代码怎么控制前台外置js和css文件?
<html>
<head>
<script>
function abc()
{
var today=new Date();
var otherDay=new Date(today.getTime()-259200000);
document.getElementById("txt1").value=today.toLocaleString();
document.getElementById("txt2").value=otherDay.toLocaleString();
}
</script>
</head>
<body onload="abc()">
<input type="text" id="txt1"/>
<input type="text" id="txt2"/>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script>
function abc()
{
var today=new Date();
var otherDay=new Date(today.getTime()-259200000);
document.getElementById("txt1").value=today.toLocaleString();
document.getElementById("txt2").value=otherDay.toLocaleString();
}
</script>
</head>
<body onload="abc()">
<input type="text" id="txt1"/>
<input type="text" id="txt2"/>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script>
function abc()
{
var today=new Date();
var otherDay=new Date(today.getTime()-259200000);
document.getElementById("txt1").value=today.toLocaleString();
document.getElementById("txt2").value=otherDay.toLocaleString();
}
</script>
</head>
<body onload="abc()">
<input type="text" id="txt1"/>
<input type="text" id="txt2"/>
</body>
</html>