天下無雙
阿龍 --质量是流程决定的。

test1.aspx  
  <html>  
  <head>  
  </head>  
  <body>  
  <input   id="t"   type="button"   onclick="window.showModalDialog('test2.aspx',   document.all['t']);"   value="打开">  
  </body>  
  </html>  
   
  test2.aspx  
  <html>  
  <head></head>  
  <body>  
  <input   type="button"   onclick="window.dialogArguments.value   =   '改变了'"   value="点击改变test1.aspx里按钮的值">  
  </body>  
  </html>

==================

window.showModalDialog('test2.aspx',   document.all['t'])  
   
  相当于把id为t的这个按钮做为变量传递给test2.aspx,如果有必要的话你可以把整个test1.aspx都传递过去,就是用window.showModalDialog('test2.aspx',   window);  
   
  这时候在test2.aspx中的window.dialogArguments就相当于opener了

posted on 2009-03-04 10:20  阿龍  阅读(211)  评论(0编辑  收藏  举报