Microsoft VB脚本VB编译错误代码:800A0400
问题描述:
我是VB脚本的初学者,我尝试在VB中使用hello world程序,但是它会给您带来编译错误,请帮助我如何解决此问题.
我使用以下代码
我用noepade编写了此代码,并保存为Hello.vbs
Hi,
I am beginer in VB scripting, I tried to use a hello world program in VB but it gives compilation error somebody please help me how to solve this problem.
I use following code
I written this code in notepade and saved as Hello.vbs
<html>
<body>
<script type="text/vbscript">
document.write("Hello World")
</script>
</body>
</html>
答
此脚本只能在IE下运行,而不能作为".vbs"文件运行.
看到这里:
http://www.w3schools.com/vbscript/default.asp [
This script will only run under IE not as a ".vbs" file.
See here:
http://www.w3schools.com/vbscript/default.asp[^]
打开记事本&写以下行:
msgbox("Hello World")
将其另存为Hello.vbs,双击时将显示警告框.
检查以下VB脚本教程
http://www.w3schools.com/vbscript/default.asp [
open a notepad & write the following line:
msgbox("Hello World")
save it as Hello.vbs, when you double click, this will display the alert box.
check the following VB script tutorial
http://www.w3schools.com/vbscript/default.asp[^]
Mehdi是正确的,它将仅在IE中工作.
Mehdi is right, It''ll work only in IE.
Wiki [ 但是,其他网络浏览器(例如Firefox)和Opera不具有对VBScript的内置支持.这意味着,在需要客户端脚本和跨浏览器兼容性的情况下,开发人员通常会选择JavaScript而不是VBScript.
有关特定错误号的详细信息,请参见此
.
代码错误800A0400-预期语句 [
For details about the particular Error number, see this
Code Error 800A0400 - Expected Statement[^]
查看全文