Ôõô°Ñjavascriptת»»³Éjquery£¿£¿£¿
function Page(iAbsolute,sTableId,sTBodyId)
{
this.absolute = iAbsolute; //ÿҳ×î´ó¼Ç¼Êý
this.tableId = sTableId;
this.tBodyId = sTBodyId;
this.rowCount = 0;//¼Ç¼Êý
this.pageCount = 0;//Ò³Êý
this.pageIndex = 0;//Ò³Ë÷Òý
this.__oTable__ = null;//±í¸ñÒýÓÃ
this.__oTBody__ = null;//Òª·ÖÒ³ÄÚÈÝ
this.__dataRows__ = 0;//¼Ç¼ÐÐÒýÓÃ
this.__oldTBody__ = null;
this.__init__(); //³õʼ»¯;
};
/*
³õʼ»¯
*/
Page.prototype.__init__ = function(){
this.__oTable__ = document.getElementById(this.tableId);//»ñÈ¡tableÒýÓÃ
this.__oTBody__ = this.__oTable__.tBodies[this.tBodyId];//»ñÈ¡tBodyÒýÓÃ
this.__dataRows__ = this.__oTBody__.rows;
this.rowCount = this.__dataRows__.length;
try{
this.absolute = (this.absolute <= 0) || (this.absolute>this.rowCount) ? this.rowCount : this.absolute;
this.pageCount = parseInt(this.rowCount%this.absolute == 0
? this.rowCount/this.absolute : this.rowCount/this.absolute+1);
}catch(exception){}
this.__updateTableRows__();
};
Page.prototype.GetBar=function(obj)
{
var bar= document.getElementById(obj.id);
bar.innerHTML= "ÿҳ"+this.absolute+"Ìõ/¹²"+this.rowCount+"Ìõ";// µÚ2Ò³/¹²6Ò³ Ê×Ò³ ÉÏÒ»Ò³ 1 2 3 4 5 6 ÏÂÒ»Ò³ ĩҳ
}
/
Ïà¹ØÎÊ´ð£º
ÈçÓÐÒ»¸ötextbox£¬Óû§ÊäÈëºóµãbutton°´Å¥Ê±£¬ÊµÏÖÓÃJavaScript¶ÔtextboxÊäÈëÐÅÏ¢µÄÑéÖ¤£¬ÒªÇóÓÃJavaScriptÀ´ÊµÏÖ£¬±ÈÈçÑéÖ¤Óû§ÊäÈëµÄÊÇ·ñÊÇÊý×Ö¡£
Ï£Íû½«HTML´úÂëÒ»²¢Ð´³öÀ´¹þ£¬Ð»Ð»
HTML code:
<!DOC ......
ǰÓжà¸öJavaScriptº¯Êý
ºóÃæÌá½»¿É <form name="" action="" method="" onsubmit="return isPostalCode();return isID();return isEmail() "
¿ÉÕâÑùÐ ......
<script>
with(document)
{
for(var i=0;i <streams.length;i++)
writeln(" <p> <a href=# onclick=change(streams[i].url)>"+streams[i].name+" </a> < ......
ÈçºÎʵÏÖµ±Êó±êÐüÍ£¿Ø¼þÉÏʱ£¬³öÏָÿؼþµÄβ²¿ÏÔʾ¶ÔÓ¦µÄ²ã£¬Êó±êÒÆ¶¯µ½¸Ã²ãÉϽøÐÐÏàÓ¦µÄ²Ù×÷£¬µ±Êó±êÒÆ³ýʱ£¨²»ÔڿؼþÉÏÒ²²»ÔÚ²ãÉÏ£©²ãÒþ²Ø£¬
http://topic.csdn.net/u/20090830/23/5e5ded07-7216-46c2-9712- ......
ÏëÒªµÄЧ¹ûÊÇ£ºµã»÷ÐÐÍ·£¨»òÁÐÍ·£© ¶ÔÓ¦µÄÕûÐУ¨»òÕûÁУ©ÑÕÉ«±ä»¯ µ«ÊÇÐÐÍ·ºÍÁÐÍ·ÑÕÉ«²»±äÔٴεã»÷Ñ¡ÖÐÐÐÍ·£¨»òÁÐÍ·£©Ê± ÑÕÉ«»Ö¸´ÎªÔÀ´ÑÕÉ«~
Èç¹ûµãеÄÒ»ÐлòÁУ¬Ö®Ç°µÄÐлòÁÐÑÕÉ«»Ö¸´£¬Ðµã»÷µÄÐбä ......