qq_干脆面_cnsIST
2018-10-15 22:36
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>定时器</title>
<script type="text/javascript">
var attime;
function clock(){
var time=new Date();
attime=time.toLocaleString();
document.getElementById("clock").value = attime;
}
window.setInterval("clock()",100);
</script>
</head>
<body>
<form>
<input type="text" id="clock" size="50" />
</form>
</body>
</html>
attime=time.toLocaleString();
这个方法哪里学到的?我没看见啊
厉害,学到了
JavaScript进阶篇
468194 学习 · 21891 问题
相似问题