| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 386 人关注过本帖
标题:[求助]小弟有个程序要问大家程序爱好者意见
只看楼主 加入收藏
ste0193
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-12-19
收藏
 问题点数:0 回复次数:1 
[求助]小弟有个程序要问大家程序爱好者意见

请问这些程序的意思和用处.

Form_content = KillHTMLLabel(Replace(Replace(Replace(Replace(Form_content,"</p>",VbCrLf & VbCrLf),"</P>",VbCrLf & VbCrLf),"<BR>",VbCrLf),"<br>",VbCrLf))
Form_PrintContent = UBB_FiltrateBadWords(PrintTrueText(Form_content))
Form_content = ""


Function ResumeCode(Tstr)

Dim str
str = Tstr
str = Replace(str,"&gt;",">")
Str = Replace(str,"&lt;","<")
Str = Replace(str,"&quot;","""")
Str = Replace(str," &nbsp; &nbsp; &nbsp;",chr(9))
Str = Replace(str,"<br>" & "&nbsp;",VbCrLf & " ")
Str = Replace(str,"<br>" & VbCrLf,VbCrLf)
Str = Replace(str,"&nbsp;"," ")
ResumeCode = Str

End Function


function HTMLEncode(text){
text = text.replace(/&/g, "&amp;") ;
text = text.replace(/"/g, "&quot;") ;
text = text.replace(/</g, "&lt;") ;
text = text.replace(/>/g, "&gt;") ;
text = text.replace(/'/g, "&#146;") ;
text = text.replace(/\ /g,"&nbsp;");
text = text.replace(/\n/g,"<br>");
text = text.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");
return text;
}

function insert(what) {
if (!validateMode()) return;
LEADEDT.focus();
var sel = LEADEDT.document.selection.createRange();

switch(what){
case "nowdate":
var d = new Date();
insertHTML(d.toLocaleDateString());
break;
case "nowtime":
var d = new Date();
insertHTML(d.toLocaleTimeString());
break;
case "br":
insertHTML("<br>")
break;
case "code":
insertHTML('[CODE]'+HTMLEncode(sel.text)+'[/CODE]');
break;
case "quote":
insertHTML('[QUOTE]'+HTMLEncode(sel.text)+'[/QUOTE]');
break;
case "fly":
insertHTML('[FLY]'+HTMLEncode(sel.text)+'[/FLY]');
break;
default:
insertHTML("' + sel.text + "");
break;
}
sel=null;
}

搜索更多相关主题的帖子: 爱好者 意见 
2006-12-19 23:18
ming206
Rank: 2
来 自:重庆
等 级:等待验证会员
威 望:3
帖 子:545
专家分:7
注 册:2005-8-2
收藏
得分:0 
总的来看就是玩转Replace函数进行特殊符号的过滤/。insert是通过分支结构insertHTML不同的代码/

外贸综合平台:E贸通
2006-12-20 00:10
快速回复:[求助]小弟有个程序要问大家程序爱好者意见
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.035559 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved