<SCRIPT LANGUAGE="JScript"></SCRIPT>
里面的函数本身是不运行的,需要标签外部触发。改成这样试试- <HTML>
-
- <SCRIPT LANGUAGE="JScript">
-
- function test1(){
-
- var value=document.getElementById("button1").value;
-
- alert(value);
-
- }
-
- </SCRIPT>
-
- <Form name="form1" id="form1">
-
- <Input Type="button" name="button1" id="button1" value="退 出" onclick="window.close()">
- <Input Type="button" name="button2" id="button2" value="显示button1属性" onclick="test1();">
- </Form>
-
- </HTML>
复制代码
|