JavaScript 计时器 【每日一段代码72】

<html>

<head>

<script type="text/javascript">

function timeMsg()

{

var t=setTimeout("alert('5 秒!')",5000);

}

</script>

</head>

<body>

<form>

<input type="button" value="点击显示时间弹出框" onclick="timeMsg()" />

</form>

<body>

</html>

原文地址:https://www.cnblogs.com/naokr/p/2436573.html