在实际的页面开发中,我们一定会用到连接,那么它有几种打开方式:
-
覆盖原页面:<a href="xxxxxxxx" >,这也是默认的方式
-
累计点击只在一个新页面打开:<a href="xxxxxx" target="_paren">
-
点击一次在一个新页面打开一次:<a href="xxxxxx" target="_blank">
-
window.location.href="/show/user/register.jsp";
-
<button type="button" onclick="window.location.href='xxxx'">申请</button>;
-
打开一个窗口window.open("xxxx");
-
返回上一页 href="javascript:history.back(-1)"
-
当前页面刷新:location.reload(true);
返回上一页并刷新:window.location.href=document.referrer;
返回不刷新:history.go(-1);