js 页面跳转两种方式(原页面跳转,打开新标签页)

1 页面跳转(原页面跳转)

(1)a标签实现

<a href="https://blog.csdn.net/qq_38974638">旭东怪的博客</a>

(2)window.location.href实现

window.location.href="https://blog.csdn.net/qq_38974638";

2 页面跳转 (打开新标签页)

(1)a标签实现

<a href="https://blog.csdn.net/qq_38974638" target="_blank">旭东怪的博客</a>

(2)window.open()实现

window.open("https://blog.csdn.net/qq_38974638");

 


版权声明:本文为qq_38974638原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。