帮我看看VBS哪里错了,显示第十行第一个
[code]const title="追星测试"const yourname="蔡徐坤"
const question="你最喜欢的明星是谁,请在下面方框中输入他的名字"
const scend="你说出了你的心扉,那就向他表白吧~"
dimyouranswer
do
youranswer=inputbox(question,title)
if youranswer <> yourname then
msgbox info,vbinformation
+vbokonly,title
loop until youranswer=yourname
msgbox scend,vbinformation
+vbokonly,title[/code] 错误共有三处:
1.msgbox 第一个参数,如果为常量要加“”,不知道楼主此处要显示给用户屏幕的信息是什么(假设你要显示空白)?
2.if 结构缺少end if 结束语。
3.第五行变量声明,应在dim后面加空格。[code]option explicit
const title="追星测试"
const yourname="蔡徐坤"
const question="你最喜欢的明星是谁,请在下面方框中输入他的名字"
const scend="你说出了你的心扉,那就向他表白吧~"
dim youranswer
do
youranswer=inputbox(question,title)
if youranswer <> yourname then
msgbox "",vbinformation + vbokonly,title
end if
loop until youranswer=yourname
msgbox scend,vbinformation+vbokonly,title[/code]
页:
[1]