//一个应该常用的javascript string函数,不知为何没有直接提供 String.prototype.escapeHTML = function () { return this.replace(/&/g,'&').replace(/>/g,'>').replace(/</g,'<').replace(/"/g,'"'); };