国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > JavaScript > 正文

教你如何分頁玩轉客戶端靜態頁面

2024-05-06 15:44:55
字體:
來源:轉載
供稿:網友

 

?

?

?







?

?


header

?

?

?


footer

?

?

她說:“牛頓坐在樹下,眼睛盯著樹在思考,這時,有一個蘋果落在他的頭上,于是他發現了萬有引力定律,孩子們,你們想想看,做一位偉大的科學家多么好,多么神氣啊,要想做到這一點,就必須好好學習。”

“班上一個調皮鬼對此并不滿意。他說:“興許是這樣,可是,假如他坐在學校里,埋頭書本,那他就什么也發現不了啦。”

女老師竭力向孩子們證明,學習好功課的重要性。

她說:“牛頓坐在樹下,眼睛盯著樹在思考,這時,有一個蘋果落在他的頭上,于是他發現了萬有引力定律,孩子們,你們想想看,做一位偉大的科學家多么好,多么神氣啊,要想做到這一點,就必須好好學習。”

“班上一個調皮鬼對此并不滿意。他說:“興許是這樣,可是,假如他坐在學校里,埋頭書本,那他就什么也發現不了啦。”

女老師竭力向孩子們證明,學習好功課的重要性。

她說:“牛頓坐在樹下,眼睛盯著樹在思考,這時,有一個蘋果落在他的頭上,于是他發現了萬有引力定律,孩子們,你們想想看,做一位偉大的科學家多么好,多么神氣啊,要想做到這一點,就必須好好學習。”

“班上一個調皮鬼對此并不滿意。他說:“興許是這樣,可是,假如他坐在學校里,埋頭書本,那他就什么也發現不了啦。”

女老師竭力向孩子們證明,學習好功課的重要性。

她說:“牛頓坐在樹下,眼睛盯著樹在思考,這時,有一個蘋果落在他的頭上,于是他發現了萬有引力定律,孩子們,你們想想看,做一位偉大的科學家多么好,多么神氣啊,要想做到這一點,就必須好好學習。”

“班上一個調皮鬼對此并不滿意。他說:“興許是這樣,可是,假如他坐在學校里,埋頭書本,那他就什么也發現不了啦。”

女老師竭力向孩子們證明,學習好功課的重要性。

她說:“牛頓坐在樹下,眼睛盯著樹在思考,這時,有一個蘋果落在他的頭上,于是他發現了萬有引力定律,孩子們,你們想想看,做一位偉大的科學家多么好,多么神氣啊,要想做到這一點,就必須好好學習。”

“班上一個調皮鬼對此并不滿意。他說:“興許是這樣,可是,假如他坐在學校里,埋頭書本,那他就什么也發現不了啦。”

";
function DHTMLpagenation(content) { with (this)
{
?// 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.contentStyle=null;
?this.strDisplayContent="";
?this.divDisplayPagenation;
?this.strDisplayPagenation="";

?arguments.length==2?perpageLength=arguments[1]:'';

?try {
??divExecuteTime=document.createElement("DIV");
??document.body.appendChild(divExecuteTime);
?}
?catch(e)
?{
?}
?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;
??}
?}

?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;
??}
?}

?DHTMLpagenation.initialize();
?return this;

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

?pageSizeCount=Math.ceil((contentLength/perpageLength));

?DHTMLpagenation.goto(currentPage);
?DHTMLpagenation.displayContent();
}};
DHTMLpagenation.displayPage=function() { with (this)
{
?strDisplayPagenation="分頁:";

?if(currentPage&¤tPage!=1)
??strDisplayPagenation+='上一頁??';
?else
??strDisplayPagenation+="上一頁??";

?for(var i=1;i ?{
??if(i!=currentPage)
???strDisplayPagenation+=''+i+'??';
??else
???strDisplayPagenation+=i+"??";
?}

?if(currentPage&¤tPage!=pageSizeCount)
??strDisplayPagenation+='下一頁??';
?else
??strDisplayPagenation+="下一頁??";

?strDisplayPagenation+="共 " + pageSizeCount + " 頁,每頁" + perpageLength + " 字符,調整字符數:";

?divDisplayPagenation.innerHTML=strDisplayPagenation;
}};
DHTMLpagenation.previous=function() { with(this)
{
?DHTMLpagenation.goto(currentPage-1);
}};
DHTMLpagenation.next=function() { with(this)
{
?DHTMLpagenation.goto(currentPage+1);
}};
DHTMLpagenation.goto=function(iCurrentPage) { with (this)
{
?startime=new Date();
?if(regularExp.test(iCurrentPage))
?{
??currentPage=iCurrentPage;
??strDisplayContent=content.substr((currentPage-1)*perpageLength,perpageLength);
?}
?else
?{
??alert("page parameter error!");
?}
?DHTMLpagenation.displayPage();
?DHTMLpagenation.displayContent();
}};
DHTMLpagenation.displayContent=function() { with (this)
{
?divDisplayContent.innerHTML=strDisplayContent;
}};
DHTMLpagenation.change=function(iPerpageLength) { with(this)
{
?if(regularExp.test(iPerpageLength))
?{
??DHTMLpagenation.perpageLength=iPerpageLength;
??DHTMLpagenation.currentPage=1;
??DHTMLpagenation.initialize();
?}
?else
?{
??alert("請輸入數字");
?}
}};

// method
// DHTMLpagenation(strContent,perpageLength)

DHTMLpagenation(s,100);

//-->

?

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 平塘县| 阿鲁科尔沁旗| 昂仁县| 屏山县| 田阳县| 台安县| 永安市| 滦平县| 林西县| 利辛县| 尉氏县| 霸州市| 宁晋县| 和顺县| 阿图什市| 称多县| 连州市| 班戈县| 清丰县| 巴彦淖尔市| 武城县| 米泉市| 信丰县| 龙门县| 喀喇| 柳林县| 法库县| 佛教| 闵行区| 仙居县| 牡丹江市| 雷州市| 修文县| 丹棱县| 宿迁市| 赣榆县| 遂平县| 连江县| 梨树县| 旅游| 通江县|