javascript长文章分页代码

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>21大学生兼职网</title>
<link href="inc/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE10 {
color: #000000;
font-size: 14px;
font-weight: bold;
}
.STYLE12 {
font-weight: bold;
color: #000000;
font-size: 13px;
}

-->
</style>
</head>

<body>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
     <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
             <tr>
         <td width="675" height="650" valign="top"><table width="95%" height="640" border="0" align="center" cellpadding="0" cellspacing="0">
           <tr>
             <td height="10"></td>
           </tr>
           <tr>
             <td valign="top"><table width="100%" height="370" border="0" cellpadding="0" cellspacing="0">
                 <tr>
                   <td width="643" height="1" bgcolor="#CCCCCC"></td>
                 </tr>
                 <tr>
                   <td height="369" valign="top"><table cellspacing="0" cellpadding="0">
                     <tr>
                       <td><div align="center"><strong><br>兰州一职工因公致残18年后状告原单位获赔69万</strong></div></td>
                     </tr>
                     <tr>
                       <td valign="top" align="left" height="246"><p><br />
<div id="divPagenation"></div>
<div id="divContent"></div>
<div id="Content" style="display: none;">                        8月6日,记者从有关方面了解到,兰州市中级人民法院近日对一起18年前发生的“截瘫”案进行审理,法院判决兰州市安宁堡罐头厂赔偿被害人朱先生残疾补助金、后续医疗费共69万元,兰州市安宁区安宁堡街道办事处承担连带责任。<br />
                         <br />
                         1989年7月17日,在安宁区安宁堡街道办事处下属企业罐头厂工作的朱先生,乘坐单位的车到陇西县拉杏子途中,因发生翻车事故造成朱先生胸7椎体以下截瘫,双下肢肌肉萎缩,丧失功能,为二级伤残,自主大小便、自主活动、睡眠翻身等三项功能产生障碍。事故发生后,单位领导非常重视,在前期的治疗中给付了医疗费用。因当时朱先生对自己的伤势未能作出正确判断,在1993年,朱先生与罐头厂在安宁堡街道办的见证下签订了协议,约定朱先生日后的生活费由厂里每月支付280元。每月280元的生活费用在后来的几年是越来越不够用,朱先生的康复治疗也因此中断。直到2005年,厂里才答应将朱先生的生活费涨到400元。后来朱先生的伤情一直在恶化、复发,除了住院还需进行康复功能训练,配备辅助器械等护理用具,且多年卧病在床,生活不能自理,需要有专人护理。朱先生认为,按照目前400元的有关费用,远远不能弥补实际造成的损害后果。2006年,朱先生将安宁堡罐头厂、安宁堡街道办事处起诉到兰州中院,请求对该案重新处理,并索赔77万余元。 <br />
                         朱先生的委托代理人窦律师认为,以前朱先生和单位签订的协议显失公平,每月400元的生活费用根本无法维持朱先生的日常护理。兰州中院审理认为,由于朱先生经司法鉴定属于二级伤残,今后的生活需要护理,还需要后续治疗。法院一审判决兰州市安宁堡罐头厂给付朱宗祯伤残补助金14.5万元、后续医疗费54万元,加上其他各项费用共计69万元,由兰州市安宁堡街道办承担连带赔偿责任。法院判决后,安宁堡罐头厂和安宁堡街道办均不服,目前已上诉到甘肃省高级人民法院。<br />
                                  
                         1989年7月17日,在安宁区安宁堡街道办事处下属企业罐头厂工作的朱先生,乘坐单位的车到陇西县拉杏子途中,因发生翻车事故造成朱先生胸7椎体以下截瘫,双下肢肌肉萎缩,丧失功能,为二级伤残,自主大小便、自主活动、睡眠翻身等三项功能产生障碍。事故发生后,单位领导非常重视,在前期的治疗中给付了医疗费用。因当时朱先生对自己的伤势未能作出正确判断,在1993年,朱先生与罐头厂在安宁堡街道办的见证下签订了协议,约定朱先生日后的生活费由厂里每月支付280元。每月280元的生活费用在后来的几年是越来越不够用,朱先生的康复治疗也因此中断。直到2005年,厂里才答应将朱先生的生活费涨到400元。后来朱先生的伤情一直在恶化、复发,除了住院还需进行康复功能训练,配备辅助器械等护理用具,且多年卧病在床,生活不能自理,需要有专人护理。朱先生认为,按照目前400元的有关费用,远远不能弥补实际造成的损害后果。2006年,朱先生将安宁堡罐头厂、安宁堡街道办事处起诉到兰州中院,请求对该案重新处理,并索赔77万余元。<br />
                         <br />  
                         1989年7月17日,在安宁区安宁堡街道办事处下属企业罐头厂工作的朱先生,乘坐单位的车到陇西县拉杏子途中,因发生翻车事故造成朱先生胸7椎体以下截瘫,双下肢肌肉萎缩,丧失功能,为二级伤残,自主大小便、自主活动、睡眠翻身等三项功能产生障碍。事故发生后,单位领导非常重视,在前期的治疗中给付了医疗费用。因当时朱先生对自己的伤势未能作出正确判断,在1993年,朱先生与罐头厂在安宁堡街道办的见证下签订了协议,约定朱先生日后的生活费由厂里每月支付280元。每月280元的生活费用在后来的几年是越来越不够用,朱先生的康复治疗也因此中断。直到2005年,厂里才答应将朱先生的生活费涨到400元。后来朱先生的伤情一直在恶化、复发,除了住院还需进行康复功能训练,配备辅助器械等护理用具,且多年卧病在床,生活不能自理,需要有专人护理。朱先生认为,按照目前400元的有关费用,远远不能弥补实际造成的损害后果。2006年,朱先生将安宁堡罐头厂、安宁堡街道办事处起诉到兰州中院,请求对该案重新处理,并索赔77万余元。<br />
                         1989年7月17日,在安宁区安宁堡街道办事处下属企业罐头厂工作的朱先生,乘坐单位的车到陇西县拉杏子途中,因发生翻车事故造成朱先生胸7椎体以下截瘫,双下肢肌肉萎缩,丧失功能,为二级伤残,自主大小便、自主活动、睡眠翻身等三项功能产生障碍。事故发生后,单位领导非常重视,在前期的治疗中给付了医疗费用。因当时朱先生对自己的伤势未能作出正确判断,在1993年,朱先生与罐头厂在安宁堡街道办的见证下签订了协议,约定朱先生日后的生活费由厂里每月支付280元。每月280元的生活费用在后来的几年是越来越不够用,朱先生的康复治疗也因此中断。直到2005年,厂里才答应将朱先生的生活费涨到400元。后来朱先生的伤情一直在恶化、复发,除了住院还需进行康复功能训练,配备辅助器械等护理用具,且多年卧病在床,生活不能自理,需要有专人护理。朱先生认为,按照目前400元的有关费用,远远不能弥补实际造成的损害后果。2006年,朱先生将安宁堡罐头厂、安宁堡街道办事处起诉到兰州中院,请求对该案重新处理,并索赔77万余元。</p>
        </div>                       
</td>
                     </tr>
                   </table>                   </td>
                 </tr>
             </table></td>
           </tr>
           <tr>
             <td width="8"></td>
           </tr>
           <tr>
             <td height="1" bgcolor="#CCCCCC"></td>
           </tr>
           <tr>
             <td height="8"></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
           </tr>
         </table></td>
         <td width="1"><table height="590"   border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
           <tr>
             <td width="1"></td>
           </tr>
         </table></td>
        </tr>
     </table></td>
   </tr>
   <tr>
     <td>&nbsp;</td>
   </tr>
</table>
<SCRIPT LANGUAGE="JavaScript">
<!--
function DHTMLpagenation(content) {
// client static html file pagenation
this.content=content;
this.contentLength=content.length;
this.pageSizeCount;
this.perpageLength=100; //default perpage byte length.
this.currentPage=1;
//this.regularExp=/.+[\?\&]{1}page=(\d+)/;
this.regularExp=/\d+/;
this.divDisplayContent;
this.divDisplayPagenation;
this.contentStyle=null;
this.strDisplayContent="";
this.strDisplayPagenation="";
arguments.length==2?perpageLength=arguments[1]:'';
try {
     divExecuteTime=document.createElement("DIV");
     document.body.appendChild(divExecuteTime);
}
catch(e)
{
}
if(document.getElementById("divPagenation"))
{
     divDisplayPagenation=document.getElementById("divPagenation");
}
else
{
     try
     {
      divDisplayPagenation=document.createElement("DIV");
      divDisplayPagenation.id="divPagenation";
      document.body.appendChild(divDisplayPagenation);
     }
     catch(e)
     {
      return false;
     }
}
if(document.getElementById("divContent"))
{
     divDisplayContent=document.getElementById("divContent");
}
else
{
     try
     {
      divDisplayContent=document.createElement("DIV");
      divDisplayContent.id="divContent";
      document.body.appendChild(divDisplayContent);
     }
     catch(e)
     {
      return false;
     }
}

DHTMLpagenation.initialize();
return this;

};

DHTMLpagenation.initialize=function()
{
divDisplayContent.className=contentStyle!=null?contentStyle:"divContent";
if(contentLength<=perpageLength)
{
     strDisplayContent=content;
     divDisplayContent.innerHTML=strDisplayContent;
     return null;
}

DHTMLpagenation.displayContent();
pageSizeCount=Math.ceil((contentLength/perpageLength));
DHTMLpagenation.goto(currentPage);
};
DHTMLpagenation.displayContent=function()
{
divDisplayContent.innerHTML=strDisplayContent;
};


DHTMLpagenation.displayPage=function()
{
strDisplayPagenation="分页:";
if(currentPage&&currentPage!=1)
     strDisplayPagenation+='<a href="javascript:void(0)" οnclick="DHTMLpagenation.previous()">上一页</a>&nbsp;&nbsp;';
else
     strDisplayPagenation+="上一页&nbsp;&nbsp;";
for(var i=1;i<=pageSizeCount;i++)
{
     if(i!=currentPage)
      strDisplayPagenation+='<a href="javascript:void(0)" οnclick="DHTMLpagenation.goto('+i+');">'+i+'</a>&nbsp;&nbsp;';
     else
      strDisplayPagenation+=i+"&nbsp;&nbsp;";
}
if(currentPage&&currentPage!=pageSizeCount)
     strDisplayPagenation+='<a href="javascript:void(0)" οnclick="DHTMLpagenation.next()">下一页</a>&nbsp;&nbsp;';
else
     strDisplayPagenation+="下一页&nbsp;&nbsp;";
//strDisplayPagenation+="共 " + pageSizeCount + " 页,每页" + perpageLength + " 字符,调整字符数:<input type='text' value='"+perpageLength+"' id='ctlPerpageLength'><input type='button' value='确定' οnclick='DHTMLpagenation.change(document.getElementById(\"ctlPerpageLength\").value);'>";
divDisplayPagenation.innerHTML=strDisplayPagenation;
};
DHTMLpagenation.previous=function()
{
DHTMLpagenation.goto(currentPage-1);
};
DHTMLpagenation.next=function()
{
DHTMLpagenation.goto(currentPage+1);
};
DHTMLpagenation.goto=function(iCurrentPage)
{
startime=new Date();
if(regularExp.test(iCurrentPage))
{
     currentPage=iCurrentPage;
     strDisplayContent=content.substr((currentPage-1)*perpageLength,perpageLength);
}
else
{
     alert("page parameter error!");
}

DHTMLpagenation.displayContent();
DHTMLpagenation.displayPage();
};

DHTMLpagenation.change=function(iPerpageLength)
{
if(regularExp.test(iPerpageLength))
{
     DHTMLpagenation.perpageLength=iPerpageLength;
     DHTMLpagenation.currentPage=1;
     DHTMLpagenation.initialize();
}
else
{
     alert("请输入数字");
}
};

// method
// DHTMLpagenation(strContent,perpageLength)
DHTMLpagenation(document.getElementById('Content').innerHTML,1500);
//-->
</SCRIPT>
</body>
</html>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值