<a>标签中的href中,如果你写一个路径默认是以相对路径打开的,加上"http://" 消息头那就可以打开绝对路径

html:

<a href=javascript:void(0); target=_blank onclick=Common.openUrl("' + rowObject.baiduPanUrl + '")>' + cellvalue + '</a>'

js:

openUrl: function(url) {
            if (url.indexOf("http") != 0) {
                window.open("http://" + url);
            } else {
                window.open(url);
            }
        }

 

相关文章:

  • 2022-02-03
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
  • 2021-11-27
  • 2021-09-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
相关资源
相似解决方案