显示定时的警告框

<html>
<head>
<script type="text/javascript">
function timedMsg()
{
var t=setTimeout("alert('5 秒!')",1000)
}
</script>
</head>

<body>
<form>
<input type="button" value="显示定时的警告框" onClick = "timedMsg()">
</form>
<p>请点击上面的按钮。警告框会在 1 秒后显示。</p>
</body>

</html>

posted @ 2014-11-25 12:07  Coda  阅读(234)  评论(0编辑  收藏  举报