ajax返回值自动添加pre标签的解决方法
直接上代码:
//response = response.replace(/<pre>/ig, "").replace(/<\/pre>/ig, ""); //过滤 if (response.indexOf("{") > -1 && response.indexOf("}") > -1) { var beginx = response.indexOf("{"); var endx = response.lastIndexOf("}") + 1; response = response.substring(beginx, endx); }