码迷,mamicode.com
首页 > 其他好文 > 详细

页面跳转

时间:2018-04-12 18:06:05      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:set   round   页面跳转   put   定时   html   value   button   code   

点击跳转

........ssss.
 
 
 
 
 

 

 
 

<style><!--
a:link {
font-size: 12px;

text-decoration:none;
}
a:visited {
font-size: 12px;
color: #000000;
text-decoration:none;
}
a:hover {
font-size: 12px;
color: #000000;
text-decoration:none;
}
--></style>

 
 
 
<style> 
a{ text-decoration:none} 
</style> 

 

 
 
 
 
第一:通过html锚点实现滚动定位到页面指定位置(DIV) 

 <a href="#abc">点击跳转</a>
<div id="ad10">
    .........
</div>

 

 
 
 
方法二:通过点击button按钮使用js实现滚定跳转到页面指定位置(DIV)

<input  type="button" name="Submit" value="提交"  onclick="javascript:onTopClick();" />
<div id="abc">将要跳转到这里</div>
<script>
  function onTopClick() {
    window.location.hash = "#abc";
 }
</script>
//列表显示
$(function(){
    helpFind(); //页面请求数据,并加载数据
    
    setTimeout(function(){  //使用  setTimeout()方法设定定时100毫秒
           window.location.hash="#ad10";//页面定位
        },100);
 });

 

页面跳转

标签:set   round   页面跳转   put   定时   html   value   button   code   

原文地址:https://www.cnblogs.com/ls-2018/p/8808770.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!