现在的位置: 首页 > 综合 > 正文

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

2012年05月16日 ⁄ 综合 ⁄ 共 552字 ⁄ 字号 评论关闭

<%
'功能:输出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

抱歉!评论已关闭.