您的位置:程序门 -> web 开发 -> asp



关于文本编译


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


关于文本编译
发表于:2008-01-22 13:59:39 楼主
  <size=4> <face=楷体_gb2312> <b> <size=2> 测试 </size> </b> <i> 测试 </i> <u> 测试 </u> </face> </size>
自动转换为相应样式,而直接显示“测试”相应的文字样式
发表于:2008-01-22 14:03:411楼 得分:0
正则,替换
发表于:2008-01-22 14:08:562楼 得分:0
大老,不会啊。今天收货。请贴个代码给我。小弟不胜感激
发表于:2008-01-22 23:16:043楼 得分:0
html code
<span id="xx"><size=4> <face=楷体_gb2312> <b> <size=2> 测试 </size> </b> <i> 测试 </i> <u> 测试 </u> </face> </size></span> <script language="javascript"> var xstr=xx.innertext xx.innertext=xstr </script>
发表于:2008-01-23 01:53:154楼 得分:0
vbscript code
<% function striphtml(strhtml) 'strips the html tags from strhtml dim objregexp, stroutput set objregexp = new regexp objregexp.ignorecase = true objregexp.global = true objregexp.pattern = "<.+?>" 'replace all html tag matches with the empty string stroutput = objregexp.replace(strhtml, "") 'replace all < and > with < and > stroutput = replace(stroutput, "<", "<") stroutput = replace(stroutput, ">", ">") striphtml = stroutput 'return the value of stroutput set objregexp = nothing end function


详细请参考


快速检索

最新资讯
热门点击