北京212吉普2017款图片:请问编写asp时出现这个问题怎么办?

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/30 13:33:35
这是代码:<html><head></head><title></title></head>
<body>
<%
sub studentscore(score)
if(score<60) then
response.write("you fail your exam!")
exit sub
end if
response.write("you pass your exam!")
end sub
dim score
score=inputbox("please input the student's score!")
studentscore(score)
%>
</body>
</html>
错误是这样的:
错误类型:
Microsoft VBScript 运行时错误 (0x800A0046)
没有权限: 'inputbox'
/webgame/studentscore.asp, 第 12 行
那是不是还要在前面标注
<%@ language=vbscript %>
就可以了吧!!!

VBScript脚本可以写在asp下的服务器端脚本和浏览器下的客户端脚本,而inputbox是浏览器对象,所以只能用客户端脚本来编写

asp代码中不能调用inputbox函数,这个可以通过用VBScript脚本来编写。

inputbox 只能用在JAVASCRIPT里