<head>
<meta http-equiv="content-type" content="text/htmlcharset=gbk" />
<title>作业堆积如山</title>
</head>
<body>
<script type="text/javascript">
function timea(){
var today= new Date()
var hour= today.getHours()
var minute= today.getMinutes()
var second= today.getSeconds()
var millis= today.getMilliseconds()
var e=hour+":"+minute+":"+second+":"+millis
document.getElementById("timec").value=e //修改成这样就OK了
return true
}
</script>
<form method="get" action="y.html" onsubmit="timea()">
<input type="text" name="timestamp" id="timec" value=""/>
<input type="submit" name="" value="Vote"/>
<input type="reset" name="" value="clear"/>
</form>
</body>
</html>
捕获数据包,有在发送 ,地址却不显示,也许我这里y.html不存在吧
比如onload事件里面,执行了一段代码,执行完成之后,想让它过5秒执行另一段代码:<script>
function abc(){
//执行你的代码
setTimeout("bbb()",5000)//设置5秒钟后执行bbb方法
}
function bbb(){
alert("123")
}
</script>
<body onload="abc()"></body>
var date = new Date()var hour = date.getHours()
if(hour<4){//0~3:59:59
location.href='/a'
}else if(hour>4){5~23:59:59
location.href='/b'
}else{//4~4:59:59
var second = date.getSeconds()
var minute = date.getMinutes()
if(second + minute === 0){//4:0:0
location.href='/a'
}else{//4点其他时间
location.href='/b'
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)