var str="<>"; str=str.replace(/\‘/g,"’");//替换半角单引号为全角单引号 str=str.replace(/\"/g,"”");//替换半角双引号为全角双引号 str=str.replace(/</g,"《").replace(/>/g,"》");
原文地址:https://www.cnblogs.com/yuzhen0228/p/12015857.html
时间: 2024-10-14 01:47:52
var str="<>"; str=str.replace(/\‘/g,"’");//替换半角单引号为全角单引号 str=str.replace(/\"/g,"”");//替换半角双引号为全角双引号 str=str.replace(/</g,"《").replace(/>/g,"》");
原文地址:https://www.cnblogs.com/yuzhen0228/p/12015857.html