`

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

    博客分类:
  • 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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics