chrome中弹出模态对话框,通过window.returnValue赋返回值关闭后,有的情况下无法取得返回值。

没有找到太好的解决办法,暂时处理方法是,在弹出窗口中同时给 window.opener.ReturnValue 赋返回值。这样在关闭窗口后,通过下面的代码取得返回值:

 

1 var val = window.showModalDialog(...);
2  if(!val)
3 val= window.ReturnValue;

这样在IE、FF、及Chrome中,都可以得到返回值了。

相关文章:

  • 2022-12-23
  • 2021-06-19
  • 2021-10-29
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-17
  • 2021-06-21
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
相关资源
相似解决方案