[JS1] 如何嵌入

 

 1 <html>
 2 <head>
 3 <title>在HTML文档中嵌入JavaScript代码是如何嵌入到HTML文档中的。</title>
 4 <script language="javascript">
 5     <!--
 6     window.defaultStatus="使用HTML标记嵌入JavaScript代码"
 7     function getnews()
 8     {
 9         document.form1.textbox.value = "在HTML文档中使用JavaScript代码"
10     }
11     //-->
12 </script>
13 </head>
14 <body>
15 <center>
16 <h1>使用 JavaScript</h1>
17 <hr>
18 <form name="form1">
19 <input type=text name="textbox" size=40 value="单击按钮查看信息">
20 <br><br>
21 <input type=button value = "查看信息" onclick = "getnews()">
22 </form>
23 </center>
24 </body>
25 </html>

 

posted @ 2014-05-13 22:50  beautifulzzzz  阅读(455)  评论(0编辑  收藏  举报