Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ò»¸öͨÓõÄJavaScript·ÖÒ³


Ò»¸öͨÓõÄJavaScript·ÖÒ³
1.JavaScript´úÂë
Pagination=function(id)
{
var totalNum=0;
var maxNum=10;
var pageUrl="";
var breakpage = 5;
var currentposition = 0;
var breakspace = 2;
var maxspace = 4;
var currentpage=1;
var perpage=10;
var id =id;
this.initPage = function(pageName)
{
var count = this.getTotalNum();
perpage = this.getMaxNum();
if (currentpage==null){
currentpage = 1;
}else{
currentpage = parseInt(currentpage);
}
var pagecount = Math.floor(count/perpage)+1;

var pagestr = "";
var prevnum = currentpage-currentposition;
var nextnum = currentpage+currentposition;
if(prevnum<1) prevnum = 1;
if(nextnum>pagecount) nextnum = pagecount;
pagestr += (currentpage==1)?'<span class="disabled"> <ÉÏÒ»Ò³</span>':'<span><a href="javascript:'+pageName+'.page_onclick('+(this.getIndexPage()-1)+',\''+pageName+'\')"><ÉÏÒ»Ò³</a></span>';
if(prevnum-breakspace>maxspace){
for(i=1;i<=breakspace;i++)
pagestr += '<a href="javascript:'+pageName+'.page_onclick('+i+',\''+pageName+'\')">'+i+'</a>';
pagestr += '...';
for(i=pagecount-breakpage+1;i<prevnum;i++)
pagestr += '<a href="javascript:'+pageName+'.page_onclick('+i+',\''+pageName+'\')">'+i+'</a>';
}else{
for(i=1;i<prevnum;i++)
pagestr += '<a href="javascript:'+pageName+'.page_onclick('+i+',\''+pageName+'\')">'+i+'</a>';
}
for(i=prevnum;i<=nextnum;i++){
pagestr += (currentpage==i)?'<span class="current">'+i+'</span>':'<a href="javascript:'+pageName+'.page_onclick('+i+',\''+pageName+'\')">'+i+'</a>';
}
if(pagecount-breakspace-nextnum+1>maxspace){
for(i=nextnum+1;i<=breakpage;i++)
pagestr += '<a href="javascript:'+pageName+'.page_onclick('+i+',\''+pageName+'\')">'+i+'</a>';
pagestr += '<span class="break">...</sp


Ïà¹ØÎĵµ£º

javascriptÖеÄÄ£¿éºÍÃû×Ö¿Õ¼ä

JavaScriptÖеÄÄ£¿éºÍÃû×Ö¿Õ¼äÊDz»¿ÉÇø·ÖµÄÄÚÈÝ¡£
ÎÒÃǶ¨ÒåµÄÿ¸öµ¥¶ÀµÄº¯Êý¶¼ÊÇ×÷Ϊȫ¾Ö¶ÔÏóµÄÒ»¸öÊôÐÔ¡£¶øJavaScript´úÂëÄ£¿éËù±ØÐë×ñÑ­µÄ×îÖØÒªµÄ¹æÔò¾ÍÊÇ£º±ÜÃⶨÒåÈ«¾Ö±äÁ¿¡£ÒòΪ£¬µ±¶¨ÒåÒ»¸öÈ«¾Ö±äÁ¿Ê±£¬¶¼Òª±»ÆäËûÄ£¿é¸²¸ÇµÄΣÏÕ£¬ËùÒÔÄ£¿é»¯±àÂëÒªÓÃÈçÏ·½Ê½£º
var ModuleClass={};
ModuleClass.º¯ÊýÃû1=functio ......

JavaScriptÔÚIEµØÖ·À¸ÖеÄÃîÓÃ

ÍêÈ«´ò¿ªÒ³Ãæºó£¬ÔÚ¸ÃÒ³µÄÔÚIEµØÖ·À¸ »ò °´Ctrl+O ÊäÈëÒÔÏ´úÂ룬»Ø³µ£¬¾Í¿ÉÒԵõ½ÏàÓ¦µÄЧ¹û£º
1.ÏÔʾÍøÒ³ÖеÄËùÓÐͼƬ
javascript:Ai7Mg6P='';for%20(i7M1bQz=0;i7M1bQz<document.images.length;i7M1bQz++){Ai7Mg6P+='<img%20src='+document.images[i7M1bQz].src+'><br>'};if(Ai7Mg6P!=''){document.wri ......

¸øGridView¼ÓÁ½¸öjavascriptÌØЧ

ÔÚÊý¾Ý°ó¶¨Ê¼þÖÐдÈçÏ´úÂ룺
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row .RowType == DataControlRowType .DataRow)//ÅжÏÊÇ·ñΪÊý¾ÝÐÐ
{
//ÔÚµã»÷ɾ³ýʱ£¬µ¯³öÌáʾ¶Ô»°¿ò
LinkButton lb = e.Row.FindControl("LinkB ......

JavaScriptÓ¦ÓóÌÐò¾­µäʵÀý

    ±¾Êé·âÃæÉϵĶ¯ÎïÊǺÓÂí£¨hippopotamus£©¡£ºÓÂíÔ­²úÓÚ·ÇÖÞµÄijЩµØÇø£¬ÆÜÏ¢ÔÚºÓÖлòºÓ±ßµÄ²ÝµØÉÏ¡£ºÓÂíÃû×ÖµÄÔ­ÎÄhippopotamus¾ÍÊÇÏ£À°ÎÄ¡°ºÓÂí¡±¡£ËüÃÇÓÐÅÓ´ó±¿ÖصÄÉíÇû£¬ÕûÈÕÀïÓÅÑŵØÔÚË®ÖÐ×ßÀ´×ßÈ¥¡£Ò¹ÀïºÓÂíÀ뿪ˮ±ßÈ¥ÃÙʳ¡£ËüÃǵÄʳÎïÖ÷ÒªÊDzݣ¬Ã¿Ìì150°õ£¬»¹ÓÐһЩˮÉúÖ²ÎïºÍÂä¹û¡£ºÓÂíûÓÐÊ²Ã´Ì ......

javascript Öпؼþ±³¾°É«µÄÉèÖÃ

function Search(){
//Èç¹ûÇ°Ò»¸ö¿Ø¼þµÄÖµ´óÓÚºóÒ»¸ö¿Ø¼þµÄÖµ(Ç°ÌáÊǺóÒ»¸ö¿Ø¼þ²»ÊÇ¿Õ,¿ÕµÄÇé¿öϲ»×öÈκδ¦Àí)
 if(document.forms[0].koteifrom.value > document.forms[0].koteiTo.value && document.forms[0].koteiTo.value != ""){
  alert('messageÄÚÈÝ');
  var koteifrom ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ