js处理服务器返回的字符串
function FormatJSON(Str) {
try{
Str = Str.replace(/\\/g, "");
Str = Str.replace(/(^\"{1})|(\"{1}$)/g, "");
Str = Str.replace(/(^(null\(){1})|((\)){1}$)/g, "");
Str = JSON.parse(Str);
return Str;
}catch(e){
return {};
};
};