–
‘函數(shù)名稱: Alert(showType,str,url)
‘函數(shù)功能: 彈出對(duì)話框
‘參數(shù)說(shuō)明: showType 顯示類別 1 返回上一頁(yè)面 2 轉(zhuǎn)到另一頁(yè)面 3 關(guān)閉窗口
‘ str 錯(cuò)誤信息
‘ url 轉(zhuǎn)向地址
‘*********************************
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