–
‘函數名稱: 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