有時候我們在寫asp的時候需要給用戶一些反饋信息,這個自定義的返回信息函數,很方便大家使用
'************************
'子程序名:信息提示窗口
'功能:信息提示,並作返回或者轉向
'參數:
'str 提示字符串
'stype 處理類型:Back 返回 GoUrl 轉向 Close 關閉
'url 轉向方向
'************************
Sub MsgBox(str,stype,url)
response.write "<script language=javascript>"
response.write "alert('"&str&"');"
select case stype
case "Back"
response.write "history.go(-1);"
case "GoUrl"
response.write "window.location='"&url&"'"
case "Close"
response.write "window.close()"
end select
response.write "</script>"
End Sub
具體的使用方法就不說了,很簡單