这段JAVA代码实现的功能用VBS该怎么写

来源:百度知道 编辑:UC知道 时间:2024/05/18 06:03:29
提交留言后弹出成功对话框,点确定回到book.asp

response.write "<script language='javascript'>"
if view="0" then
response.write "alert('留言提交成功,留言须经管理员审核才能发布。');"
else
response.write "alert('留言提交成功,单击“确定”返回留言列表!');"
end if
response.write "location.href='book.asp';"
response.write "</script>"
response.end

end if

上面这段的功能用VBS该怎么写呢?下面是VBS的,但点确定不能回到指定网页

Set Rs = Conn.Execute("Insert Into [GuestBook] (UserName, Info, Title, Content, Sort) Values ('"& fname &"', '"&

finfo &"', '"& ftitle &"', '"& fcontent &"', "& fsort &")")
pMsg = "留言提交成功,单击“确定”返回留言列表!!"
Call PopMsg("发表留言")
end if

"<script language='javascript'>"
把你上边的PopMsg这个函数里的单引号都换成双引号试一下.

ASP向前台的javascript输出双引号,要两个才算一个.比如response.write "<script language=""javascript"">" 才行.