日期:2014-05-17  浏览次数:20739 次

请问这段代码那里出错了?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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=utf-8" />
<title>无标题文档</title>
</head>

<body>
<%
sub s_msgbox(str)
response.Write("<script language=vbscript>msgbox"&str&"</script>")
end sub
%>
<%
s_msgbox"你好!"
%>
</body>
</html>


------解决方案--------------------
运行一下。。
------解决方案--------------------
response.Write("<script language=vbscript>msgbox"&str&"</script>")
这里错了,
msgbox()是VB服务端的函数,用于客户端无效,

改为
response.Write("<script language=javascript >alert('"&str&"')</script>")
------解决方案--------------------
response.Write("<script language=vbscript>msgbox"&str&"</script>")
vbscript改为 javascript
java语言 不是vb语言。

------解决方案--------------------
js vb两大类脚本
------解决方案--------------------
楼主是在ie测试的吗?vbscript只是ie支持的。
------解决方案--------------------
探讨

楼主是在ie测试的吗?vbscript只是ie支持的。