<!DOCTYPE HTML> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>alert</title> <script type="text/javascript"> function rec(){ var mychar="I love JavaScript"; alert(mychar); } rec(); </script> </head> <body> </body> </html>
求解为什么这段代码会自己跳出窗口?