网页制作问题html....我添加时间代码但出现不了时间 20
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登陆</title>
<script src="pl.js">
</script>
<style type="text/css">
.tt2{
background-color:#FF9;
}
</style>
</head>
<body class="tt2">
<form id ="form1" name ="name1" action="">
<table width="325" height="159" border="2">
<tr>
<td width="91">用户名:</td>
<td width="192"><label for ="username"></label>
<input type="text" name="uesrname" id="username" ></td>
</tr>
<tr>
<td height="26">密码:</td>
<td> <label for ="userpwd"></label>
<input type="password" name="uesrpwd" id="userpwd" ></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" name="bthlogin" id="bthlogin" value="登陆" onclick="check();"/>
<input type="reset" name="button2" id="botton2" value="重置" />
</td>
</tr>
</table>
</form>
</body>
</html> 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登陆</title>
<script src="pl.js">
</script>
<style type="text/css">
.tt2{
background-color:#FF9;
}
</style>
</head>
<body class="tt2">
<form id ="form1" name ="name1" action="">
<table width="325" height="159" border="2">
<tr>
<td width="91">用户名:</td>
<td width="192"><label for ="username"></label>
<input type="text" name="uesrname" id="username" ></td>
</tr>
<tr>
<td height="26">密码:</td>
<td> <label for ="userpwd"></label>
<input type="password" name="uesrpwd" id="userpwd" ></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" name="bthlogin" id="bthlogin" value="登陆" onclick="check();"/>
<input type="reset" name="button2" id="botton2" value="重置" />
</td>
</tr>
</table>
</form>
</body>
</html> 展开
1个回答
展开全部
(复制以下代码)
<SCRIPT language=javascript>
<!--
var now = new Date(2001,02,01,10,10,00);//在此处填写服务器当前时间即可
function CurentTime(){
var mm = now.getMinutes();
var ss = now.getTime() % 60000;ss = (ss - (ss % 1000)) / 1000;
var clock = now.getHours() +':';
if (mm < 10) clock += '0';
clock += mm+':';
if (ss < 10) clock += '0';
return(clock + ss);
}
function refresh(){
document.getElementById("clock").innerHTML = now.getYear()+"年"+now.getMonth()+"月"+now.getDate()+"日 "+ CurentTime();now.setSeconds(now.getSeconds()+1);}
setInterval('refresh()',1000);
//-->
</SCRIPT>
<div id="clock"></div>
<SCRIPT language=javascript>
<!--
var now = new Date(2001,02,01,10,10,00);//在此处填写服务器当前时间即可
function CurentTime(){
var mm = now.getMinutes();
var ss = now.getTime() % 60000;ss = (ss - (ss % 1000)) / 1000;
var clock = now.getHours() +':';
if (mm < 10) clock += '0';
clock += mm+':';
if (ss < 10) clock += '0';
return(clock + ss);
}
function refresh(){
document.getElementById("clock").innerHTML = now.getYear()+"年"+now.getMonth()+"月"+now.getDate()+"日 "+ CurentTime();now.setSeconds(now.getSeconds()+1);}
setInterval('refresh()',1000);
//-->
</SCRIPT>
<div id="clock"></div>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询