【发布时间】:2018-09-25 17:18:51
【问题描述】:
<html>
<head>
<script type="text/vbscript" >
Function Hello()
Msgbox "Hello World"
End Function
</script>
</head>
<body>
<input type="button" value="click" onclick="Hello()" />
</body>
</html>
点击按钮后,我得到 Hello is undefined
【问题讨论】:
-
你用的是什么浏览器?
-
使用扩展名 .hta 保存此代码
-
我也在使用 googecrome 和 IE
-
嗯,vbscript 与谷歌浏览器不兼容,你应该改用javascript。
-
@vitoriahmc 我也在 IE 中尝试,但它不起作用。