如下:

拼接的html:

" onclick=\"valDocName2('"+JSON.stringify(doc).replace(new RegExp("\"","g"), "AAABBBCCCDDD")+"')\" " +

js方法:
function valDocName2(doc) {
console.dir(doc);
var aa = doc.replace(new RegExp("AAABBBCCCDDD","g"), "\"").toString();
console.dir(aa);
var jd = JSON.parse(aa);
console.dir(jd);
}

其中doc为js对象;

相关文章:

  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2021-09-09
猜你喜欢
  • 2022-01-03
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
相关资源
相似解决方案