运用inputbox的一段代码

来源:百度知道 编辑:UC知道 时间:2024/05/30 17:15:58
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="vbscript">
<!--
sub text()
dim name
name=inputbox("请输入姓名","登陆", ,200,300)
if name<>"" then
msgbox"你好:"&name,1,"欢迎光临"
else
magbox"请输入姓名"
end if
-->
</script>
</head>

1.
name=inputbox("请输入姓名","登陆", ,200,300)
中的括号请使用半角英文括号,逗号请使用半角英文逗号,你使用的都是中文的逗号
name=inputbox("请输入姓名","登陆", ,200,300)

2.
sub text() 缺少end sub
请在end if下面添加
end sub

3.
end if上面的
magbox"请输入姓名"
拼写错误
应该是
msgbox