请教:这个onLoad事件怎么不起反应

我在页面onLoad事件中加载test()函数,给form1.T1赋一个初值,但没有任何反应

 1<html>
 2<head>
 3<script language="javacript"><!--   
 4function test()   
 5{   
 6var y = new Date().getFullYear();   
 7document.form1.T1.value = y   
 8}   
 9\--></script>
10<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
11<meta content="Microsoft FrontPage 4.0" name="GENERATOR"/>
12<meta content="FrontPage.Editor.Document" name="ProgId"/>
13<title>Test</title>
14</head>
15<body onload="test()">
16<form method="POST" name="form1">
17<p><input name="T1" size="20" type="text"/></p>
18</form>
19</body>
20</html>

---------------------------------------------------------------

1<script language="javacript"></script>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus