日期:2014-05-16  浏览次数:20308 次

关于showModalDialog返回值以后刷新页面的问题
function   showwindow()
{
var   str=   window.showModalDialog( 'HTMLPage2.htm ', 'window ', 'dialogHeight:   550px;   dialogWidth:1000px;   center:   Yes;   help:   No;   resizable:   Yes;   status:   No; ');
window.location.href=window.location.href;


}
这是我的函数,我把str保存在页面1.aspx的一个文本控件里,但是每次刷新以后值就没有了?我想让值不清空掉同时也要刷新页面

------解决方案--------------------
你那个值在挂在url上就不会丢掉了
window.location.href=window.location.href+ "?a= "+document.getElementById( "str1 ").value;
在新页面截取URL