The ASP site preview, drag the bottom when the webpage will automatically jump u

The ASP site preview, drag the bottom when the webpage will automatically jump up. At present only pulled to the bottom go to can jump up, jump jump just to the middle of one place, 3 seconds will jump up, what will the next will automatically jump? I said I didn't add task aiming point function. There is only one news and product references, are a few select Update.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="css1.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Website home page</title>
</head>
<!--#include file=conn.asp-->
<%
set rs2 = Server.CreateObject("ADODB.recordset")
rs2.Open "SELECT new_title FROM concent", conn
%>
<body>
<!--#include file=top1.asp-->
<!--#include file=index3.asp-->
<div class="index12">
<div class="index12-dh" align="center">
<div class="index12-dh1">
<div class="index12-dh3">&nbsp;</div>
<div class="index12-dh4">&nbsp;</div>
<div class="index12-dh3"><img src="images/dhnew.jpg" width="88" height="25" /></div>
<div class="index12-dh5"><!--#include file=dhxw1.asp--></div>
</div>
<div class="index12-dh2">
<div class="dhnew2">Enterprise free service hotline:</div>
<div class="dhnew">1222-455-264</div>
</div>
</div>
</div>
<div align="center">
<div style="width:1000px;">
<div>
<table width="1270" align="center" background="images/serverb.png" class="syn">
<tr>
<td width="310"><div>
<div class="synew">
<div class="sydiv">Photography and design</div>
<a href="#"><img src="images/sheying.jpg" alt="ali" width="194" height="121"/> It is based on optical photography photography, photographic chemical and electronic technology, a unique camera system formed in the long-term practice. </a></div>
</div></td>
<td width="310"><div>
<div class="synew">
<div class="sydiv">Creative design</div>
<a href="#"><img src="images/chuangyi.jpg" alt="ali" height="124"/> As visual means of communication and expression, through the picture and text combination to be used to convey ideas or information. </a></div>
</div></td>
<td width="310"><div>
<div class="synew">
<div class="sydiv">Planning design</div>
<a href="#"><img src="images/sheji.jpg" alt="ali"/>Through the scientific method and the art of certain strategies, decision-making, planning and conception, design, manufacturing process planning. </a></div>
</div></td>
<td width="320"><div>
<div class="synew">
<div class="sydiv">Service concept</div>
<a href="#"><img src="images/server1.jpg" alt="ali" height="130"/>We will build a hundred percent of the enterprise service level, that improve customer requirements as the goal, to innovation guide as auxiliary. </a></div>
</div></td>
</tr>
</table>
</div>
</div>
<!--#include file=youshi.asp-->
<div align="center" class="divdh">
<table width="80%" border="0" cellspacing="0" cellpadding="0" class="divdh1" background="images/anba.jpg">
<tr>
<td width="30"></td>
<td width="102" align="left">Project presentations</td>
<td width="694" align="left">XXXXXXXXXXX </td>
<td width="183"> <div class="divdh3">Free hotline: XXXXXXXXXXX</div></td>
</tr>
</table>
</div>
<!--#include file=sycp3.asp-->
<div style="clear:both"></div>
<div align="center" class="divdh">
<table width="80%" border="0" cellspacing="0" cellpadding="0" class="divdh1" background="images/anba.jpg">
<tr>
<td width="30"></td>
<td width="101" align="left">News and information</td>
<td width="695" align="left">XXXXXXXXXXX</td>
<td width="183"><div class="divdh3">Free hotline: XXXXXXXXXXX</div></td>
</tr>
</table>
</div>
<div>
<div class="synewd">
<!--#include file=synew.asp--></div>
</div>
</div>
<!--#include file=bottom.asp-->
</body>
</html>



The synew.asp page:
<!--#include file=conn.asp-->
<%
set rs=server.CreateObject("adodb.Recordset")
sql="Select top 8 new_id, new_title from concent where new_part='Company news' order by new_id desc "
rs.open sql,conn,1,1
%>
<%
set rs2=server.CreateObject("adodb.Recordset")
sql="Select top 8 new_id, new_title from concent where new_part='Industry news' order by new_id desc "
rs2.open sql,conn,1,1
%>
<%
set rs3=server.CreateObject("adodb.Recordset")
sql="Select top 8 new_id, new_title from concent where new_part='The news of the world' order by new_id desc "
rs3.open sql,conn,1,1
%>
<div align="center">
<div class="synew6">
<div class="synew2">
<div class="synew3">
<div class="synew4">The Enterprise News Center</div>
<% do until rs.EOF %>
<div class="synew5"><span style="color:#F00; font-size:20px;"></span><a href='shownews.asp?new_id=<%=rs.fields("new_id")%>' target="_blank">&nbsp;&nbsp;<%=left(rs("new_title"),10)%></a> <%rs.MoveNext%>
</div>
<%
loop
rs.close
%>

</div>
<div class="synew3">
<div class="synew4">News Center - Industry News</div>
<% do until rs2.EOF %>
<div class="synew5"><span style="color:#F00; font-size:20px;"></span><a href='shownews.asp?new_id=<%=rs2.fields("new_id")%>' target="_blank">&nbsp;&nbsp;<%=left(rs2("new_title"),10)%></a>
<%rs2.MoveNext%>
</div>
<%
loop
rs2.close
%>
</div>
<div class="synew3">
<div class="synew4">News Center - Global News</div>
<% do until rs3.EOF %>
<div class="synew5"><span style="color:#F00; font-size:20px;"></span><a href='shownews.asp?new_id=<%=rs3.fields("new_id")%>' target="_blank">&nbsp;&nbsp;<%=left(rs3("new_title"),10)%></a>
<%rs3.MoveNext%>
</div>
<%
loop
rs3.close
conn.close
%>
</div>
</div>
</div>
</div>

My other references page code similar to each other, do not know why, I'm a webpage to the bottom, jump to the exhibits to. If a hover above will not automatically jump

Started by Peter at November 08, 2016 - 9:08 AM

From the code does not have this problem. The URL directly affixed to it

Posted by Theobald at November 21, 2016 - 10:00 AM

You this is generally JS to check the JS file

Posted by Laurent at November 30, 2016 - 10:38 AM

JS to achieve a smooth jump to anchor(Anchor)
Anchor (Anchor) believes that many people are not unfamiliar, it is convenient to quickly jump to different location on the page, find their interested content directly, if RSS is the abstract of the entire site, the anchor is a page of the page content, usually when a lot of, can use the anchor position.

  But the anchor also has a problem, usually click anchor, the page will immediately jump to the target location, and the method introduced in this paper, the anchor (Anchor) between smooth jump, the effect is very good.

javascript:

<SCRIPT type=text/javascript>

// Description: the anchor point with Javascript (Anchor) between smooth jump
// Source : ThickBox 2.1
// Arrangement : Yanfu Xie []
// Website :
// Date : 07.01.17

// Conversion to digital
function intval(v)
{
v = parseInt(v);
return isNaN(v) ? 0 : v;
}

// Get the element information
function getPos(e)
{
var l = 0;
var t = 0;
var w = intval(e.style.width);
var h = intval(e.style.height);
var wb = e.offsetWidth;
var hb = e.offsetHeight;
while (e.offsetParent){
l += e.offsetLeft + (e.currentStyle?intval(e.currentStyle.borderLeftWidth):0);
t += e.offsetTop + (e.currentStyle?intval(e.currentStyle.borderTopWidth):0);
e = e.offsetParent;
}
l += e.offsetLeft + (e.currentStyle?intval(e.currentStyle.borderLeftWidth):0);
t += e.offsetTop + (e.currentStyle?intval(e.currentStyle.borderTopWidth):0);
return {x:l, y:t, w:w, h:h, wb:wb, hb:hb};
}

// Gets the scroll bar information
function getScroll()
{
var t, l, w, h;

if (document.documentElement && document.documentElement.scrollTop) {
t = document.documentElement.scrollTop;
l = document.documentElement.scrollLeft;
w = document.documentElement.scrollWidth;
h = document.documentElement.scrollHeight;
} else if (document.body) {
t = document.body.scrollTop;
l = document.body.scrollLeft;
w = document.body.scrollWidth;
h = document.body.scrollHeight;
}
return { t: t, l: l, w: w, h: h };
}

// Anchor (Anchor) between smooth jump
function scroller(el, duration)
{
if(typeof el != 'object') { el = document.getElementById(el); }

if(!el) return;

var z = this;
z.el = el;
z.p = getPos(el);
z.s = getScroll();
z.clear = function(){window.clearInterval(z.timer);z.timer=null};
z.t=(new Date).getTime();

z.step = function(){
var t = (new Date).getTime();
var p = (t - z.t) / duration;
if (t >= duration + z.t) {
z.clear();
window.setTimeout(function(){z.scroll(z.p.y, z.p.x)},13);
} else {
st = ((-Math.cos(p*Math.PI)/2) + 0.5) * (z.p.y-z.s.t) + z.s.t;
sl = ((-Math.cos(p*Math.PI)/2) + 0.5) * (z.p.x-z.s.l) + z.s.l;
z.scroll(st, sl);
}
};
z.scroll = function (t, l){window.scrollTo(l, t)};
z.timer = window.setInterval(function(){z.step();},13);
}

</SCRIPT>

<STYLE type=text/css>
div.test {
width:400px;
margin:5px auto;
border:1px solid #ccc;
}
div.test strong {
font-size:16px;
background:#fff;
border-bottom:1px solid #aaa;
margin:0;
display:block;
padding:5px 0;
text-decoration:underline;
color:#059B9A;
cursor:pointer;
}
div.test p {
height:400px;
background:#f1f1f1;
margin:0;
}

</STYLE>
Method call:

scroller(el, duration)

El: target anchor ID
Duration: last time, in milliseconds, the smaller the more quickly

Posted by Glen at December 13, 2016 - 11:29 AM