在第一个页面按钮提交时把数据拼接成串作为QueryString
例如document.location.href = 'test2.html?mydata1=test';
2、在第二个页面加上Javascript取location中的mydata1=test然后赋给要显示的控件就可以了。取值可以用正则表达式。例如:
var result = location.search.match(new RegExp("[\?\&]mydata1=([^\&]+)","i"))[1];
下面是个例子,你可以参考下:
"test1.html"
"test2.html"
alert(location.search.match(new RegExp("[\?\&]mydata1=([^\&]+)","i"))[1]);