把:hous=now.getHours();改为:hours=now.getHours();
把:seconds=now.getSceonds();改为:seconds=now.getSeconds();
把:seconds=now.getSceonds();改为:seconds=now.getSeconds();
解决方案 »
- 请问该如何在spring AOP中不执行目标方法???
- myEclipse安装svn后不能使用了,请大家帮帮忙
- 下拉选项select构造函数new option(text,value)的问题
- 【webservice】为什么是JAXBElement<String>而不是String类型
- 使用jsp连接数据库,简单页面,但是报错说驱动程序类没有找到。
- 〈jsp:useBean id=“DBconn1” scope=“page” class=“DBconn” /〉
- 关于向数据库插入记录的问题?
- 一定给分!
- 哪个软件是开发JSP功能比较强的?(能够编译,指出出错语句)
- 用intellij Idea13的请进
- 请高手们阐述html,jsp,javascript之间的关系
- 在上海做Java,JSP工资有多少?
<title>一个数字的时钟</title>
<head>
<script language="javascript">
var timeStr,dateStr;
function clock()
{
now=new Date();
hours=now.getHours();
minutes=now.getMinutes();
seconds=now.getSeconds();
timeStr+=""+hours;
timeStr=timeStr+((minutes<10) ? ":0":":")+minutes;
timeStr=timeStr+((seconds<10) ? ":0":":")+seconds;
document.clock.time.value=timeStr;date=now.getDate();
month=now.getMonth()+1;
year=now.getYear;
dateStr+=""+month;
dateStr=dateStr+((date<10) ? "/0":"/")+date;
dateStr+="/"+year;
document.clock.date.value=dateStr;
Timer=setTimeout("clock()",1000);
}
</script>
</head>
<body onLoad="clock()">
<form name="clock">
Time:
<input type="text" name="time" size="8" value=""><br>
Date:
<input type="text" name="date" size="8" value="">
</form>
</body>
</html>
改好了,给分吧,老兄!