有没有方法给html进行编码?
例如把 " < "、 "> "等字符编码成<、>这种格式?
------解决方案--------------------
String.prototype.replaceStr=function(){return this.replace(/&/g, "& ").replace(/\ "/g, "" ").replace(/ </g, "< ").replace(/> /g, "> ");}
查询谷 - www.chaxungu.com
有没有方法给html进行编码?解决方法
编辑:chaxungu时间:2022-10-02 23:20:25分类:web开发