最新更新 sitemap 网站制作设计本站搜索
网页设计
国外网站 韩国网站 个人主页 手提袋设计 CSS 网页特效 平面设计 网站设计 Flash CMS技巧 服装网站 php教程 photoshop 画册 服务器选用 数据库 Office
虚拟主机 域名注册 云主机 网页设计 客服QQ:8208442
当前位置:首页 > 网页JS特效 > 文本特效类

文本特效:客户端静态页面玩分页

日期:02-07    来源:    作者:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">l3b中国设计秀
<HTML>l3b中国设计秀
<HEAD>l3b中国设计秀
<TITLE>客户端静态页面玩分页 ww.qpsh.com</TITLE>l3b中国设计秀
<style>l3b中国设计秀
* {l3b中国设计秀
 font-size:10.2pt;l3b中国设计秀
 font-family:tahoma;l3b中国设计秀
 line-height:150%;l3b中国设计秀
}l3b中国设计秀
.divContentl3b中国设计秀
{l3b中国设计秀
 border:1px solid red;l3b中国设计秀
 background-color:#FFD2D3;l3b中国设计秀
 width:500px;l3b中国设计秀
 word-break:break-all;l3b中国设计秀
 margin:10px 0px 10px;l3b中国设计秀
 padding:10px;l3b中国设计秀
}l3b中国设计秀
</style>l3b中国设计秀
</HEAD>l3b中国设计秀
<BODY>l3b中国设计秀
headerl3b中国设计秀
<div id="divPagenation"></div>l3b中国设计秀
<div id="divContent"></div>l3b中国设计秀
footerl3b中国设计秀
<SCRIPT LANGUAGE="JavaScript">l3b中国设计秀
<!--l3b中国设计秀
s="<p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p><p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p><p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p><p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p><p>女老师竭力向孩子们证明,学习好功课的重要性。 </p><p>她说:“牛顿坐在树下,眼睛盯着树在思考,这时,有一个苹果落在他的头上,于是他发现了万有引力定律,孩子们,你们想想看,做一位伟大的科学家多么好,多么神气啊,要想做到这一点,就必须好好学习。” </p><p>“班上一个调皮鬼对此并不满意。他说:“兴许是这样,可是,假如他坐在学校里,埋头书本,那他就什么也发现不了啦。” </p>";l3b中国设计秀
function DHTMLpagenation(content) { with (this)l3b中国设计秀
{l3b中国设计秀
 // client static html file pagenationl3b中国设计秀
 this.content=content;l3b中国设计秀
 this.contentLength=content.length;l3b中国设计秀
 this.pageSizeCount;l3b中国设计秀
 this.perpageLength=100; //default perpage byte length.l3b中国设计秀
 this.currentPage=1;l3b中国设计秀
 //this.regularExp=/.+[?&]{1}page=(d+)/;l3b中国设计秀
 this.regularExp=/d+/;l3b中国设计秀
 this.divDisplayContent;l3b中国设计秀
 this.contentStyle=null;l3b中国设计秀
 this.strDisplayContent="";l3b中国设计秀
 this.divDisplayPagenation;l3b中国设计秀
 this.strDisplayPagenation="";l3b中国设计秀
 l3b中国设计秀
 arguments.length==2?perpageLength=arguments[1]:'';l3b中国设计秀
 try {l3b中国设计秀
  divExecuteTime=document.createElement("DIV");l3b中国设计秀
  document.body.appendChild(divExecuteTime);l3b中国设计秀
 }l3b中国设计秀
 catch(e)l3b中国设计秀
 {l3b中国设计秀
 }l3b中国设计秀
 if(document.getElementById("divContent"))l3b中国设计秀
 {l3b中国设计秀
  divDisplayContent=document.getElementById("divContent");l3b中国设计秀
 }l3b中国设计秀
 elsel3b中国设计秀
 {l3b中国设计秀
  tryl3b中国设计秀
  {l3b中国设计秀
   divDisplayContent=document.createElement("DIV");l3b中国设计秀
   divDisplayContent.id="divContent";l3b中国设计秀
   document.body.appendChild(divDisplayContent);l3b中国设计秀
  }l3b中国设计秀
  catch(e)l3b中国设计秀
  {l3b中国设计秀
   return false;l3b中国设计秀
  }l3b中国设计秀
 }l3b中国设计秀
 if(document.getElementById("divPagenation"))l3b中国设计秀
 {l3b中国设计秀
  divDisplayPagenation=document.getElementById("divPagenation");l3b中国设计秀
 }l3b中国设计秀
 elsel3b中国设计秀
 {l3b中国设计秀
  tryl3b中国设计秀
  {l3b中国设计秀
   divDisplayPagenation=document.createElement("DIV");l3b中国设计秀
   divDisplayPagenation.id="divPagenation";l3b中国设计秀
   document.body.appendChild(divDisplayPagenation);l3b中国设计秀
  }l3b中国设计秀
  catch(e)l3b中国设计秀
  {l3b中国设计秀
   return false;l3b中国设计秀
  }l3b中国设计秀
 }l3b中国设计秀
 DHTMLpagenation.initialize();l3b中国设计秀
 return this;l3b中国设计秀
 l3b中国设计秀
}};l3b中国设计秀
DHTMLpagenation.initialize=function() { with (this)l3b中国设计秀
{l3b中国设计秀
 divDisplayContent.className=contentStyle!=null?contentStyle:"divContent";l3b中国设计秀
 if(contentLength<=perpageLength)l3b中国设计秀
 {l3b中国设计秀
  strDisplayContent=content;l3b中国设计秀
  divDisplayContent.innerHTML=strDisplayContent;l3b中国设计秀
  return null;l3b中国设计秀
 }l3b中国设计秀
 pageSizeCount=Math.ceil((contentLength/perpageLength));l3b中国设计秀
 DHTMLpagenation.goto(currentPage);l3b中国设计秀
 DHTMLpagenation.displayContent();l3b中国设计秀
}};l3b中国设计秀
DHTMLpagenation.displayPage=function() { with (this)l3b中国设计秀
{l3b中国设计秀
 strDisplayPagenation="分页:";l3b中国设计秀
 if(currentPage&&currentPage!=1)l3b中国设计秀
  strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.previous()">上一页</a>&nbsp;&nbsp;';l3b中国设计秀
 elsel3b中国设计秀
  strDisplayPagenation+="上一页&nbsp;&nbsp;";l3b中国设计秀
 for(var i=1;i<=pageSizeCount;i++)l3b中国设计秀
 {l3b中国设计秀
  if(i!=currentPage)l3b中国设计秀
   strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.goto('+i+');">'+i+'</a>&nbsp;&nbsp;';l3b中国设计秀
  elsel3b中国设计秀
   strDisplayPagenation+=i+"&nbsp;&nbsp;";l3b中国设计秀
 }l3b中国设计秀
 if(currentPage&&currentPage!=pageSizeCount)l3b中国设计秀
  strDisplayPagenation+='<a href="javascript:void(0)" onclick="DHTMLpagenation.next()">下一页</a>&nbsp;&nbsp;';l3b中国设计秀
 elsel3b中国设计秀
  strDisplayPagenation+="下一页&nbsp;&nbsp;";l3b中国设计秀
 strDisplayPagenation+="共 " + pageSizeCount + " 页,每页" + perpageLength + " 字符,调整字符数:<input type='text' value='"+perpageLength+"' id='ctlPerpageLength'><input type='button' value='确定' onclick='DHTMLpagenation.change(document.getElementById("ctlPerpageLength").value);'>";l3b中国设计秀
 divDisplayPagenation.innerHTML=strDisplayPagenation;l3b中国设计秀
}};l3b中国设计秀
DHTMLpagenation.previous=function() { with(this)l3b中国设计秀
{l3b中国设计秀
 DHTMLpagenation.goto(currentPage-1);l3b中国设计秀
}};l3b中国设计秀
DHTMLpagenation.next=function() { with(this)l3b中国设计秀
{l3b中国设计秀
 DHTMLpagenation.goto(currentPage+1);l3b中国设计秀
}};l3b中国设计秀
DHTMLpagenation.goto=function(iCurrentPage) { with (this)l3b中国设计秀
{l3b中国设计秀
 startime=new Date();l3b中国设计秀
 if(regularExp.test(iCurrentPage))l3b中国设计秀
 {l3b中国设计秀
  currentPage=iCurrentPage;l3b中国设计秀
  strDisplayContent=content.substr((currentPage-1)*perpageLength,perpageLength);l3b中国设计秀
 }l3b中国设计秀
 elsel3b中国设计秀
 {l3b中国设计秀
  alert("page parameter error!");l3b中国设计秀
 }l3b中国设计秀
 DHTMLpagenation.displayPage();l3b中国设计秀
 DHTMLpagenation.displayContent();l3b中国设计秀
}};l3b中国设计秀
DHTMLpagenation.displayContent=function() { with (this)l3b中国设计秀
{l3b中国设计秀
 divDisplayContent.innerHTML=strDisplayContent;l3b中国设计秀
}};l3b中国设计秀
DHTMLpagenation.change=function(iPerpageLength) { with(this)l3b中国设计秀
{l3b中国设计秀
 if(regularExp.test(iPerpageLength))l3b中国设计秀
 {l3b中国设计秀
  DHTMLpagenation.perpageLength=iPerpageLength;l3b中国设计秀
  DHTMLpagenation.currentPage=1;l3b中国设计秀
  DHTMLpagenation.initialize();l3b中国设计秀
 }l3b中国设计秀
 elsel3b中国设计秀
 {l3b中国设计秀
  alert("请输入数字");l3b中国设计秀
 }l3b中国设计秀
}};l3b中国设计秀
// methodl3b中国设计秀
// DHTMLpagenation(strContent,perpageLength)l3b中国设计秀
DHTMLpagenation(s,100);l3b中国设计秀
//-->l3b中国设计秀
</SCRIPT>l3b中国设计秀
</BODY>l3b中国设计秀
</HTML>l3b中国设计秀
本代码由<a href=http://www.cnwebshow.com>网页设计秀</a>提供l3b中国设计秀

本文引用地址:/js/article_63462.html
网站地图 | 关于我们 | 联系我们 | 网站建设 | 广告服务 | 版权声明 | 免责声明