在页面中使用了showModalDialog,但是在跳转链接时,不会在当前页执行,而是弹出一个新的页面。
查看了一下代码,发现跳转链接中使用的是location,而直接使用A生成的链接,在点击跳转时,却不会弹出新的页面。
解决:
通过JS脚本,来模拟点击了A这样的链接,而不使用location试了一下:
function go_link(url) {
       var link = document.createElement("a");
       link.href = url;
       document.body.appendChild(link);
       link.click();
}
在调用location的地方,改为调用go_link方法。
要同时配合 <base target="_self"/>


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-20
  • 2022-12-23
  • 2021-12-18
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案