asp 彈出窗口腳本函數

asp 彈出窗口腳本函數
  1. Function MsgBox(error,n)
  2.   Copyright = "/n/n     Copyright by "
  3.   Response.write "<script>alert('" & Replace(error,"'","/'") & Copyright & "');" & vbcrlf
  4.   If Vartype(n) = 2 then
  5.     If n = 1 then  Response.write "history.go(-1);" & vbcrlf
  6.     If n = 3 then   Response.write "parent.top.location.reload();" & vbcrlf
  7.     If n=4 or n=5 then Response.write "opener.location.reload();" & vbcrlf
  8.     If n=2 or n=5 then Response.write "window.close();" & vbcrlf
  9.   else
  10.     Response.write "window.location.href='" & n & "';" & vbcrlf
  11.   end if
  12.   response.write " </script>"
  13. End Function
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章