showModalDialog打开的窗口中不能使用window.opener,要给它传参数进去。a.htm中这样使用showModalDialogshowModalDialog("b.htm",window,""); //把a.htm本身对象作为参数传给b.htm
b.htm中使用window的dialogArguments属性可以得到a.htm传过来的参数var pwin=window.dialogArguments;
//不仅可以用这个来访问附窗口的所有属性,还可以直接修改
alert("父窗口的URL:" & pwin.location.href);