1. 雙引號轉換為單引號
JSON.stringify(data).replace(/\"/g,"'");
2. 單引號轉換為雙引號
data.replace(/'/g, '"');
原文出處 : https://blog.csdn.net/weixin_33845881/article/details/85861807
JSON.stringify(data).replace(/\"/g,"'");
data.replace(/'/g, '"');
原文出處 : https://blog.csdn.net/weixin_33845881/article/details/85861807
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。