导入js文件:https://files.cnblogs.com/yangyh/json2.js
function Person(name,age,birthday){ this.Name = name; this.Age = age; this.Birthday = birthday; } var p = new Person("test测123",20,new Date()); var output = JSON.stringify(p); var url = '('+output+')'; alert(output); var outP = eval('('+output+')'); e = encodeURIComponent(output) alert(e); document.write('Name:'+outP.Name+'<br />') document.write('Age'+outP.Age+'<br />') document.write('Birthday'+outP.Birthday) window.location.href = "t1.html?p="+url; t1.html: t=decodeURIComponent(getUrlPara('p')); alert(eval(t).Name);