在html中,点击一个按钮,打开一个新窗口,原页面同时跳转到某一个新界面的代码怎么写?

如题所述

这是浏览器的功能,不是html5来实现的。

把浏览器设置为“打开新窗口时总是跳转到新窗口”,就好了。

温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-08-01
<button id="demo">demo</button>

<script type="text/javascript">
<!--
$("#demo").on("click",function(){
window.location.href="b.html";
window.open("c.html");
});
//-->
</script>

本回答被网友采纳
第2个回答  2017-07-31
<a href="new.html" target="_blank">按钮</a>
相似回答