跳转滚动并重定向到博客上同一博客的另一页 [英] jump scroll with redirect to another page of same blog on blogger

查看:87
本文介绍了跳转滚动并重定向到博客上同一博客的另一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个博客。如果有人点击特定链接,我想这样做。他应该在同一页面上的特定点跳转滚动。然后在一段时间后,他应该在同一博客的其他页面上自动重定向,或重定向到其他博客。也请举例子网站地址。
我有这样的代码。



脚本就像:

  function jumpScroll(){
window.scroll(0,150);
}

HTML就像:

 < a href =javascript:jumpScroll()>滚动页面< / a> 


解决方案

  function pageScroll (){
window.scrollBy(0,50); //水平和垂直滚动增量
scrolldelay = setTimeout('pageScroll()',100); //滚动每100毫秒

code
$ b $ p $要自动滚动加载页面时,将以下代码添加到body标记中:

 < body onLoad =pageScroll()> ; 

链接如下:

 < a href =javascript:pageScroll()>滚动页面< / a> 

直接滚动到特定点:



使用scroll()方法跳转到页面上的特定点。目标位置以像素形式指定。

  function jumpScroll(){
window.scroll(0,150); //水平和垂直滚动目标
}

链接如下:

 < a href =javascript:jumpScroll()>跳转到页面上的其他位置< / a> 

转到下一页

  function jumpScroll(){
window.scroll(0,150); //水平和垂直滚动目标
window.location.replace(http://page2.html);
}

移至特定页面



您应该在每个链接中调用不同的函数,如:

  < a href =javascript:jumpScroll1()>跳转到page1< / a> 
< a href =javascript:jumpScroll2()>跳转到第2页< / a>
< a href =javascript:jumpScroll3()>跳转到第3页< / a>

脚本就像:

  function jumpScroll1(){
window.scroll(0,150); //水平和垂直滚动目标
window.location.replace(http://page1.html);



函数jumpScroll2(){
window.scroll(0,250); //水平和垂直滚动目标
window.location.replace(http://page2.html);
}


函数jumpScroll3(){
window.scroll(0,350); //水平和垂直滚动目标
window.location.replace(http://page3.html);
}

这对我来说很好。



参考链接: http://www.mediacollege.com/internet /javascript/page/scroll.html


I have a blog. i want to do if some one click on specific link. he should be jump scroll at specific point on same page. and then after some sec he should be auto redirect on other page of same blog/redirect to other blog. please also give example website address too. I have this code.

Script is Like:

  function jumpScroll(){
   window.scroll(0,150);
  }

HTML is like:

  <a href="javascript:jumpScroll()"> Scroll Page </a>

解决方案

function pageScroll() {
    window.scrollBy(0,50); // horizontal and vertical scroll increments
    scrolldelay = setTimeout('pageScroll()',100); // scrolls every 100 milliseconds
}

To being scrolling automatically when the page loads, add the following code to the body tag:

<body onLoad="pageScroll()">

The link is Like:

 <a href="javascript:pageScroll()">Scroll Page</a>

Scroll Directly to a Particular Point:

Use the scroll() method to jump to a particular point on the page.Target position specify in the form of pixels.

function jumpScroll() {
window.scroll(0,150); // horizontal and vertical scroll targets
}

Link is Like:

 <a href="javascript:jumpScroll()">Jump to another place on the page</a>

For moving to the next page:

function jumpScroll() {
window.scroll(0,150); // horizontal and vertical scroll targets
    window.location.replace("http://page2.html");
}

For moving to the specific page:

you are suppose to call the different functions in each link like:

 <a href="javascript:jumpScroll1()">jump to page1</a>
 <a href="javascript:jumpScroll2()">Jump to page2</a>
 <a href="javascript:jumpScroll3()">Jump to page3</a>

script is Like:

   function jumpScroll1() {
window.scroll(0,150); // horizontal and vertical scroll targets
    window.location.replace("http://page1.html");
}


function jumpScroll2() {
window.scroll(0,250); // horizontal and vertical scroll targets
    window.location.replace("http://page2.html");
}


function jumpScroll3() {
window.scroll(0,350); // horizontal and vertical scroll targets
    window.location.replace("http://page3.html");
}

This works fine for me.

Reference Link: http://www.mediacollege.com/internet/javascript/page/scroll.html

这篇关于跳转滚动并重定向到博客上同一博客的另一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆