js-新窗口打开页面

window.open(basePath+"/web/homeIndex?code="+code);

1.超链接<a href="http://www.xxx.net" >Welcome</a>

等效于js代码

window.location.href="http://www.xxx.net";    

2.超链接<a href="http://www.xxx.net" target="_blank">Welcome</a>

等效于js代码

window.open("http://www.xxx.net");                 //在另外新建窗口中打开窗口
原文地址:https://www.cnblogs.com/hwaggLee/p/4578680.html