摘要:
var s = "{a:1,b:2}"; console.log(typeof s); s = eval("(" + s + ")"); console.log(s); console.log(s.a); 阅读全文
摘要:
html1:testgohtml2:test 阅读全文
摘要:
var test = text.innerHTML; b = test.replace(/任晓强/g,"你好"); console.log(b);html: 任晓强去吃饭,任晓强去开车,任晓强去上班正则:/任晓强/g可替换所有任晓强,/任晓强/只可替换第一个任晓强。var test = text... 阅读全文