[导入]ASP常用函数:doAlert()

<%
'功能:输出alert信息并实现页面跳转
'来源:http://jorkin.reallydo.com/article.asp?id=470
'需要Str4Js函数:http://jorkin.reallydo.com/article.asp?id=466

Function doAlert(sInfo, sUrl)
    
Response.Write( "</scr" & "ipt>" & vbCrLf & "<scr" & "ipt language=""javascript"">" & vbCrLf )
    
If Len(sInfo & "")>0 Then Response.Write( "  alert('" & Str4Js(sInfo) & "');" & vbCrLf )
    
If Len(sUrl & "")>0 Then Response.Write( "  window.location.href='" & Str4Js(sUrl) & "';" & vbCrLf )
    
Response.Write( "</scr" & "ipt>" & vbCrLf )
    
If Len(sUrl & "")>0 Then Response.End()
End Function
%>


文章来源:http://Jorkin.Reallydo.Com/default.asp?id=470
posted @ 2008-02-28 14:12  pboy2925  阅读(168)  评论(0)    收藏  举报