unescape($("#id").val()) // html解码 escape($("#id").val()) //html编码 非常易用的JS,使用啊。 转载于:https://www.cnblogs.com/Mr-Joe/archive/2011/12/28/2304590.html