<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>alert</title>
<script type="text/javascript">
var mynum = 30;
alert("hello!");
alert(mynum);
</script>
</head>
<body>
</body>
</html>
你调用了两次alert()函数,
alert("hello!");
alert(mynum);
自然会弹出两个,删掉一个就好