注册 登录
编程论坛 ASP技术论坛

关于msgbox的使用

sunwukong28 发布于 2008-02-15 09:59, 1066 次点击
我在另外一个文件中已经定义了msgboxU"" 在其他文件也可以调用得到,但是下面这段代码却使用不了它

if request.querystring("act")="del" then
  conn.begintrans
  conn.execute"delete * from info where i_id=" & session("uid")&" and upid='"&request.QueryString("id")&"'"
 if err.number<>0 then
  msgboxU"删除失败"
  conn.rollbacktrans
 else  
  msgboxU"删除成功"
  
 end if
end if

为什么会这样啊?
2 回复
#2
yms1232008-02-17 14:43
在ASP的<%%>内是不能使用msgbox函数的。
#3
dsilence2008-02-19 11:10
如果要在<%%>里用的话定义函数的时候应该大约是这样

sub msgboxU(str)
Response.write("<script language=vbscript>msgbox"&chr(34)&str&chr(34)&"</script>")
end sub
1