
标题: VBS脚本错误{已结} [打印本页]
作者: Eblis 时间: 2007-6-9 19:58 标题: VBS脚本错误{已结}
CODE: [Copy to clipboard]
<html>
<body>
<hr color="blue">
<input type="submit" name="btnl" value="click to test the code">
<script language="VBS">
<! - -
sub btnl _ onclick
dim message
message="hello world!"
msgbox message, 0, "tester result"
end sub
- - >
</script>
</body>
</html>
请问这段网页代码错在哪里.不能弹出hello world对话框``我才刚学VBS.
[ Last edited by Eblis on 2007-6-9 at 09:36 PM ]
作者: zh159 时间: 2007-6-9 20:48
CODE: [Copy to clipboard]
<html>
<body>
<hr color="blue">
<input type="submit" name="btnl" value="click to test the code" onClick="btnl()">
<script language="VBScript">
sub btnl
dim message
message="hello world!"
msgbox message, 0, "tester result"
end sub
</script>
</body>
</html>
作者: Eblis 时间: 2007-6-9 21:34
CODE: [Copy to clipboard]
<html>
<body>
<hr color="blue">
<input type="submit" name="button1" value="click to test the code">
<script language="VBS">
<!--
sub button1_onclick()
dim message
message="hello world!"
msgbox message, 0, "tester result"
end sub
-->
</script>
</body>
</html>
找到原因了....谢谢...
[ Last edited by Eblis on 2007-6-9 at 09:36 PM ]
作者: zh159 时间: 2007-6-9 22:14
试试这两个
CODE: [Copy to clipboard]
<html>
<body>
<hr color="blue">
<input type="button" name="button" value="click to test the code 1" onClick="button('aaa!')">
<br>
<input type="button" name="button" value="click to test the code 2" onClick="button('bbb!')">
<script language="VBScript">
sub button(str)
msgbox str, 0, "tester result"
end sub
</script>
</body>
</html>
CODE: [Copy to clipboard]
<html>
<body>
<hr color="blue">
<input type="button" name="button" value="click to test the code 1" onClick="button1('aaa!')">
<br>
<input type="button" name="button" value="click to test the code 2" onClick="button2('bbb!')">
<script language="VBScript">
sub button1(str)
msgbox str, 0, "tester result 1"
end sub
sub button2(str)
msgbox str, 0, "tester result 2"
end sub
</script>
</body>
</html>
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) |
Powered by Discuz! 2.5 |