替换HTML代码

2016-01-29 13:20 6 1 收藏

替换HTML代码,替换HTML代码

【 tulaoshi.com - ASP.NET 】


将一些HTML替换掉
eg:
strContent=strContent.Replace("&","&");
strContent=strContent.Replace("'","''");
strContent=strContent.Replace("<","<");
strContent=strContent.Replace(">",">");
strContent=strContent.Replace("chr(60)","<");
strContent=strContent.Replace("chr(37)",">");
strContent=strContent.Replace(""",""");
strContent=strContent.Replace(";",";");
strContent=strContent.Replace("n","
");
strContent=strContent.Replace(" "," ");
return strContent;

来源:http://www.tulaoshi.com/n/20160129/1489777.html

延伸阅读
标签: Web开发
JS、HTML代码运行工具 JS、HTML脚本运行工具
标签: Web开发
textarea的value是html文件源代码,如何把源代码存成html文件??      如      html      head      meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312" &...
标签: Web开发
如果你是一个喜欢什么都用div来标签的人,那么这个教程一定很适合你.在这个教程里着重讲如何规范的来写HTML代码让它更加的有意义.你有没有经历过这样的场景:在编缉别人的模版时发现那些语意不明的标签,你的感觉是什么样子的.学完这个教程后你会发现规范的代码不仅仅为你以后修改代码省下时间,特别是当你调试一个大的项目时你会发现,原来规范代...
标签: Web开发
代码如下: % Function SenFe_UbbCode(sContent) Dim TempReg Set TempReg = New RegExp With TempReg .IgnoreCase = True .Global = True '自动识别网址 If InStr(Lcase(sContent),"http://")0 Then .Pattern = "(^|[^=""])(http:(\/\/|\\\\)(([\w\/\\\+\-~`@:%])+\.)+([\w\/\\\.\=\?\+\-~`@\':!%#]|(&)|&)+)" sContent = .Repla...
标签: ASP
  function htmlencode(str)     on error resume next     dim result     dim l     if isnull(str) then        htmlencode=""        exit function   ...

经验教程

63

收藏

92

精华推荐

将HTML自动转为JS代码

将HTML自动转为JS代码

free冰雪芙蓉

在php中输出html代码

在php中输出html代码

平凡者的轨迹

SEO基础: 合法有效的HTML代码

SEO基础: 合法有效的HTML代码

小怪兽mylove

微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部