写项目时,用的是 location.href ,这种方式,默认在本页面打开
html:
<a href="javascript:;" class="goto-system" rel="moniterAll">
js:
location.href = http://localhost:8081/UltraUMP/;
因业务需求,在打开一个页面时,需要打开一个新的页面。
原本以为在 a 标签中添加 target=”_blank” 就好,测试一下,不行。
看到书里面说,用 window.open() 这个函数就好。
window.open( http://localhost:8081/UltraUMP/ );