pwindy  
在完成任务的同时,还需要不断“复盘”,不论你多么的忙,都需要留下时间思考,可以思考哪些地方做的好,哪些地方我们可以改进,应该如何改进,注重总结才是王道

vue 跳转外部链接问题,当跳转的时候会添加在当前地址后面。

var url = 'www.baidu.com'

//跳转1
window.localtion.href = url

//跳转2
window.history.pushState(url);
window.history.replaceState(url);

//跳转3
window.open(url,"_blank");

//跳转4
var a = document.createElement("a");
a.setAttribute("href", "www.baidu.com");
a.setAttribute("target", "_blank");
a.click();

参考---https://www.cnblogs.com/wjw1014/p/13749191.html

posted on 2021-04-07 14:17  pwindy  阅读(4710)  评论(0编辑  收藏  举报