为什么alert(show())除了弹出show run还会弹出 undefined的窗口呢。- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>functionDemo.html</title>
-
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="this is my page">
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-
- <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
- </head>
-
- <body>
- <script type="text/javascript">
- function show()
- {
- alert("show run");
- }
- alert(show());
- //alert(show);//调用的是Object的toString方法
- </script>
- </body>
- </html>
复制代码
|