标签
Function removeHtmlTab (TAB) {
返回tab.replace( / } > / g); / /
删除所有的HTML标签
}
将普通字符
转换为能指
功能html2escape(shtml){
返回shtml.replace( / { <>} / g,功能(C){ return { ':' > ',':',':'' } { };});
}
把{能}变成普通的字符
功能escape2html(STR){
无功arrentities = {这':','nbsp ',':':'amp 'quot:};
返回str.replace( /(LT | GT | nbsp |与|);或免疫球蛋白,功能(,T){ return arrentities {T};});
}
进入
空间 功能nbsp2space(STR){
无功arrentities = { 'nbsp ':' };
返回str.replace( / /(一);免疫球蛋白,功能(,T){ return arrentities {T} })
}
输入标记
功能return2br(STR){
返回str.replace( / R;
}
在结束行开始时删除,并在2行中
连续超过3行。
功能trimbr(STR){
(str = str.replace /((的|)* R{ { 3,},); / /极限可达2次换行
(str = str.replace / ^((的|)* R+;;/清除起始行
(((的|)STR = str.replace / * R+G;;/清除结束行
返回字符;
}
将多个连续空格添加到空格中
功能mergespace(STR){
STR = str.replace( /((的|)+ / G');
返回字符;
}
将JS HTML转义字符的
方法,萧边
分享了你的全部内容。我希望能给你一个
参考,希望你能
支持它。