js中 网页中标签新窗口和location.href 新窗
2021-02-02 本文已影响0人
风度翩翩的程序猿
1,a标签 新窗口 添加属性 target="_blank"
<a href="http://www.96net.com.cn/" target="_blank" >
2,location.href 新窗口
onClick="window.open('http://www.96net.com.cn/');" 新窗口打开
onClick="javascript:location.href='http://www.96net.com.cn/';"原窗口打开