我认为单击按钮后5s会显示带有OK字符串的弹出窗口,但单击按钮后立即显示弹出窗口,为什么?
谢谢!
<html>
<head>
<title>Wake up call</title>
<script type="text/javascript">
function wakeUpCall() { // Function is defined here
setTimeout(aa("ok"), 5000);
}
function aa(bb) {
alert(bb);
}
</script>
</head>
<body bgcolor="lightblue">
<form>
<input type="button"
value="Wake me"
onclick="wakeUpCall()">
</form>
</body>
</html>