Click on the text to scroll to the middle position, with scrolling effect

Source: Internet
Author: User

<title>abc</title>
<meta http-equiv= "Pragma" content= "No-cache" >
<meta http-equiv= "Cache-control" content= "No-cache" >
<meta http-equiv= "Expires" content= "0" >
<meta http-equiv= "keywords" content= "keyword1,keyword2,keyword3" >
<meta http-equiv= "description" content= "This is my page" >

<script language= "JavaScript" src= "Jquery.js" type= "" ></script>

<script type= "Text/javascript" >

var Q=document.getelementbyid ("Choice");
box.innerhtml+=box.innerhtml;

  

function A (obj) {
q.scrolltop=45; Adjust the size of the scrolltop according to your Div
}
function B (obj) {
q.scrolltop=61;
}
function C (obj) {
q.scrolltop=79;
}
function d (obj) {
q.scrolltop=13;
}
function ee (obj) {
q.scrolltop=30;
}
</script>

<body>

<div id= "Choice" style= "Z-index:20;margin-top:25px;height:80px;overflow:hidden;" >
<a id= "A" href= "javascript:" onclick= "A (This)" >111</a>
<a id= "B" href= "javascript:" onclick= "B (This)" >222</a>
<a id= "C" href= "javascript:" onclick= "C (this)" >333</a>
<a id= "D" href= "javascript:" onclick= "D (this)" >444</a>
<a id= "E" href= "javascript:" onclick= "ee (this)" >555</a>
</div>

</body>

Click on the text to scroll to the middle position, with scrolling effect

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.