<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>系统时间</title><script language="javascript" type="text/javascript"><!--//获得当前时间,刻度为一千分一秒var initializationTime=(new Date()).getTime();function showLeftTime(){var now=new Date();var year=now.getYear();var month=now.getMonth();var day=now.getDate();var hours=now.getHours();var minutes=now.getMinutes();var seconds=now.getSeconds();document.all.show.innerHTML=""+year+"年"+month+"月"+day+"日 "+hours+":"+minutes+":"+seconds+"";//一秒刷新一次显示时间var timeID=setTimeout(showLeftTime,1000);}//--></script></head><body onload="showLeftTime()"><label id="show">显示时间的位置</label><br>
</body></html>
若要调试js,建议使用firefox,然后安装firebug插件
</body></html>
若要调试js,建议使用firefox,然后安装firebug插件
解决方案 »
- Google出了替代ajax的技术
- 如何抓取系统时间
- 静态页面的语言跳出转问题,请雷锋与非主流雷锋看一下,多谢.
- Javascript代码运行出现的一个奇怪问题,请教各位
- 如何在send form 的时候, 把整个form 发到制定的email 去?
- 超级菜鸟问题:刚学JAVA就受挫--关于环境变量
- js中,怎么判断一个radio选项值是否是(undefined)
- netscape中改变表格背景色怎么做?IE下的代码不管用
- xml的ebook教程。那里有下载的。还有谁能介绍一下他明确点的用途什么的我第一次听说xml
- jquery放大镜问题,希望能够适用于矩形,而不仅仅是正方形。求大牛帮忙~~
- js 输入框边框变色问题
- 利用jquery写Ajax调用Action问题
<head>
<title>Today's Date</title>
<script language = "javascript">
function print_todays_date(){
var d = new Date();
document.write(d.toLocaleString());
}
</script>
</head>
<body>
The date and time are:<br>
<script language="javascript">
print_todays_date();
</script>
</body>
</html>
这
d.toLocalString() 应该是toLocaleString();
d.toLocaleString();认真学习英语
2、IE8附带的javaScript调试工具不错,推荐试试