我写了刷新效果,怎么点击按钮后按钮就消失了!
<script type="text/javascript">
function time(){
var mydate=new Date();
document.write("当前时间:"+mydate+"<br>");
mydate.setTime( mydate.getTime() + 2* 60 * 60 * 1000);
document.write("推迟二小时时间:" + mydate);
}
time()
</script>
</head>
<body>
<div>
<input type='button' value='刷新' onclick='time()'/>
</div>
</body>