我爱模板网 > 建站教程 > ASP教程 >  ASP 信息提示函数并作返回或者转向_应用技巧正文

ASP 信息提示函数并作返回或者转向_应用技巧

有时候我们在写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

具体的使用方法就不说了,很简单



部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!
上一篇:ASP常用日期格式化函数 FormatDate()_应用技巧 下一篇:C++中头文件和源文件详细介绍_应用技巧
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
选择头像:
最新评论

猜你喜欢