asp实现返回上一页和转到另一页的功能函数

asp实现返回上一页和转到另一页的功能函数
'函数名称: Alert(showType,str,url)
'函数功能: 弹出对话框
'参数说明: showType 显示类别 1 返回上一页面 2 转到另一页面 3 关闭窗口
' str 错误信息
' url 转向地址
'*********************************
sub Alert(showType,str,url)
response.Write("<script language=""javascript"">"& vbcrlf)
response.Write("<!--"& vbcrlf)
response.Write("window.alert("""& str &""");"& vbcrlf)
if showType=1 then
response.Write("window.history.go(-1); "& vbcrlf)
elseif showType=2 then
response.Write("window.location.href ="""& url &"""; "& vbcrlf)
elseif showType=3 then
response.Write("window.opener=null; "& vbcrlf)
response.Write("window.close(); "& vbcrlf)
elseif showType=4 then
response.Write("top.location.href ="""& url &"""; "& vbcrlf)
end if
response.Write("//-->"& vbcrlf)
response.Write("</script>")
end sub
本文来自: IT知道网(http://www.itwis.com) 详细出处参考:http://www.itwis.com/html/asp/aspsill/20081107/2742.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值