首页 > 网站 > 建站经验 > 正文

ASP常用函数:Str4J-s()

2019-11-02 14:55:48
字体:
来源:转载
供稿:网友

 程序代码

<%
'功能:定义转换为javascript字符串输出(约定Javascript中,用单引号引用字符串)
'来源:http://www.cncms.com/asp.asp

Function Str4Js(sString)
  Str4Js = sString
  If IsNull(sString) Then Str4Js = "" : Exit Function
&nbs

6080电影网[www.aikan.tv/special/6080dianyingwang/]
p; Str4Js = Replace(Str4Js, "", "")
  Str4Js = Replace(Str4Js, "'", "'")
  Str4Js = Replace(Str4Js, vbCrLf, "n")
  Str4Js = Replace(Str4Js, vbCr, "n")
  Str4Js = Replace(Str4Js, vbLf, "n")
  Str4Js = Replace(Str4Js, vbTab, "t")
  Str4Js = Replace(Str4Js, "script", "scr'+'ipt", 1, -1 , 1)
End Function
%>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表