一个实用的ASP弹出提示框函数,方便在程序处理弹了一些对话框,我觉得这应该算是ASP中的常用函数吧,值得收藏:下面是函数代码。
Public Function Alert(msg,goUrl) msg = replace(msg,"'","\'") If goUrl="" Then goUrl="history.go(-1);" Else goUrl="window.location.href='"&goUrl&"'" End IF Response.Write ("<script language=""JavaScript"" type=""text/javascript"">"&vbNewLine&"alert('" & msg & "');"&goUrl&vbNewLine&"</script>") Response.End End Function
青岛星网温馨提醒:参数说明
msg:弹出框中需要显示的文字信息
goUrl:当用户点击弹出的对话框按钮后跳转的URL网页地址