html页面跳转代码 javascript实现页面跳转的6种方法 js跳转代码

分类:站长 时间:2024-08-28 12:41 浏览:7272
概述
html页面跳转代码 javascript实现页面跳转的5种方法 js跳转代码方法一:使用JS跳转①、跳转带参         window.location.href=”
内容

html页面跳转代码 javascript实现页面跳转的6种方法 js跳转代码

方法一:使用JS跳转

①、跳转带参

<script language="javascript" type="text/javascript">
        window.location.href="jingxuan.do?backurl=" rel="external nofollow"  + window.location.href; 
 </script>

②、跳转无参

<script>window.location.href='http://www.liesan.com';</script>


方法二:返回上一次预览界面

<script language="javascript">
   alert("返回");
   window.history.back(-1);
 </script>


方法三:html页面嵌套

<a href="javascript:history.go(-1)" rel="external nofollow" >返回上一步</a>
<a href="<%=Request.ServerVariables(" rel="external nofollow" HTTP_REFERER")%>">返回上一步</a>


方法四:button按钮添加事件跳转

<input name="前端知音" type="button" value="前端知音" onClick="location.href='login.do'">


方法五:在新窗口打开

<a href="javascript:" rel="external nofollow"  onClick="window.open('login.do','','height=500,width=611,scrollbars=yes,status=yes')">新窗口</a>


方法六:通过meta设置跳转页面

<head>
     <!--只刷新不跳转 -->
     <meta http-equiv="refresh" content="5">
     <!--定时跳转 5秒跳转 -->
     <meta http-equiv="refresh" content="5;url=http://www.liesan.com">
</head>



评论
  • 上一篇
  • 已是该分组下第一篇
  • 猎伞底部波浪
  • 猎伞底部波浪
  • 猎伞底部波浪
  • 猎伞底部波浪

我的

足迹

投稿

反馈

客服

猎伞官方客服

客服QQ:104****84 (点击直接对话)

客服电话:400****16(查看完整电话)

客服邮箱:service@liesan.com

管理仅处理交易投诉、举报、帐号、资金等平台使用问题;
商品问题请咨询各商品详情页面中显示的商家客服QQ。

正常模式精简模式

返回顶部