Javascript cool, concise, and beautiful paging effect

Source: Internet
Author: User
Tip: you can modify some code before running

Javascript cool, concise, and beautiful paging effect<!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><title>Javascript cool, concise, and beautiful paging effect</title><meta http-equiv="content-type" content="text/html;charset=gb2312"><!--把下面代码加到<head>与</head>之间--><style type="text/css">/*<![CDATA[*/.vPagging *{font-size:12px;font-family:"微软雅黑";}.vPagging{clear:both;text-align:left;margin:0 0 4px 0;height:50px;}.vPagging a{text-align:center;cursor:pointer;display:block;width:15px;float:left;height:15px;padding:5px;color:#000071;font-weight:700;margin:0 2px 0 2px;border:1px #21385b solid;background-color:#ecf5ff;text-decoration:none;font-family:"Arial";}.vPagging a.curp{border:1px #f60 solid;background-color:#fff;}.vPagging a:hover,.vPagging a:active{background-color:#21385b;color:#fff;}.vPagging p{border-top:1px solid #b2b2b2;padding:8px 0 4px 0;}/*]]>*/</style><script language="javascript" type="text/javascript">//<![CDATA[//xgz page controller beta 1.0function g(v){return document.getElementById(v);}function setPage(n,v){ var pageHTML=''; if(isNaN(n))return; for(var p=1;p<=n;p++)pageHTML+=''+p+''; g("SetPage").innerHTML=pageHTML; pageHTML="";}var xfPageNum=1;function getPage(){var xfUrl = document.location.href.toLowerCase();if(xfUrl.indexOf("page=")<0)return;var xfPara = xfUrl.split("?")[1];var xfParaArr = xfPara.split("&");for(var x=0;x<xfParaArr.length;x++)if(xfParaArr[x].indexOf('page')>= 0) var xfPage = xfparw.r [x]; xfPageNum = xfPage. substring (xfPage. indexOf ("page =") + 5); if (g ('V' + xfPageNum ). className = 'curp'; xfUrl = ''; xfPara =''; xfParaArr = ''; g ('curpagelbl '). innerHTML = ''+ xfPageNum +'';} //]></script><script language="javascript" type="text/javascript">//<![CDATA[var TotalPage=10;//Asp.Net从后台注册一段JS块,Php、Asp、Jsp都可以直接绑定总页数到这个JS变量var Parameter="&Url=nihaoku.cn&Author=xgz";//如果还有其他变量,请在这里传递参数(变量,变量用“&”隔开,如:&UserId=xgz&VideoId=a7EfbDdC2A2as)//]]></script></head><body><!--把下面代码加到<body>与</body>之间--><div id="" class="vPagging"><p>Paging: (100 records in total, 10 pages, 0th pages currently) & laquo; 1 )? ParseInt (xfPageNum)-) + Parameter; "> <page number initialization...> & Raquo;</p><script language="javascript" type="text/javascript">//<![CDATA[setPage(TotalPage,Parameter);window.setTimeout(getPage,100);//]]></script></div></body></html>
Tip: you can modify some code before running

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.