这么麻烦,把你的东西改一下就行。
<script language="vbscript">
<!--
function msg()
if msg.value = "true" then
MsgBox "书库内已有该书!", 64, "错误提示"
end if
end function
-->
</script>
<%
if name=request.form("txtbiaoti") then
msg="true"
end if
%>
<input id=msg type=hidden value=<%"msg"%>>
试试,将数据放在客户端有很多的方法。关键看你敢不敢想
笨办法:
用response.write写出客户端脚本<%
if name=request.form("txtbiaoti") then
msg="1"
end if
c=chr(10) & chr(13)
Response.Write "<script language='vbscript'>"
Response.Write "function msg() " & c
Response.Write " if " & msg & "=1 then " & c
Response.Write " MsgBox '书库内已有该书!', 64, '错误提示' " & c
Response.Write " end if " & c
Response.Write " end function " & c
Response.Write " msg() " & c