- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>form.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=GBK2312">
- <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
- <script type="text/javascript">
- function checkAll()
- {
- alert("hello");
- var info = document.getElementById("info");
- info.innerHTML = "一闪而过呢";
- }
- </script>
- </head>
- <body onload="javascript:checkAll()">
- <form>
- 用户名:
- <input type="text" name="userName"/><br/>
- <input type="submit" value="submit"/>
- <div id="info"></div>
- </form>
- </body>
- </html>
复制代码 你的javascript没有执行,你能看到一闪而过?我在body上设置了 <body onload="javascript:checkAll()"> |