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

javascript¿ØÖÆdivÐÅÏ¢¾ÓÖÐ

×ʹÓÃjquery.form.js×öÁËÒ»¸ö²éѯҳÃ棬ÔÚËÑË÷³ö½á¹ûºó£¬ÐèÒª·ÖÒ³£¬ÔÚ·ÖÒ³Öеã»÷ÏÂÒ»Ò³Ò³²ÅÓÃajaxÌá½»£¬ÔÚÌύûÓзµ»Ø½á¹ûÊÇÐèÒª¸ø¿Í»§ÏÔʾһÏÂÕýÔÚ¼ÓÔØÊý¾Ý£¬¹ÊÓÃjquery.1.3.2.js×öÁËÒ»¸öÐÅÏ¢ÌáʾµÄ½Å±¾¡£
´úÂëÈçÏ£º
<div id="loadProcess" style="z-index:1;visibility:hidden;width:300px;position:absolute;top:0px;left:0px;height:58px;border:1px solid #ccc;text-align:center;background:#fff;">
<ul>
<li></li>
<li><IMG height=9 src="../images/wait.gif" width=100></li>
<li></li>
<li>¡¾¡¡ÕýÔÚ¼ÓÔØÊý¾Ý...... ¡¿</li>
<li></li>
</ul>
</div>
½Å±¾´úÂ룺
function loadProcess(id){
 var wnd = $(window), doc = $(document);
 var left = doc.scrollLeft();
 var top = doc.scrollTop();
 //alert("scrollLeft:"+doc.scrollTop());
 //alert("windowHeight:"+wnd.height());
 left += (wnd.width() - $(id).width())/2;
 top += (wnd.height() - $(id).height())/2;
  //alert("top:"+top);
 $(id).css("top",top);
 $(id).css("left",left);
 $(id).css("visibility","visible");
}


Ïà¹ØÎĵµ£º

javascriptËÄÉáÎåÈëµÄÎÊÌâ

Çó 555.555µÄËÄÉáÎåÈë±£ÁôÁ½Î»Ð¡Êý
ʹÓÃMath.round  Ôõô¶¼Ëã²»¶Ô,½á¹û¶¼ÊÇ555.55 ,òËÆÊÇÒòΪjava¼ÆË㸡µãÊýʱ»áĪÃûÆäÃîÔÚ½áβ¸úÉÏÒ»´®Êý×Ö ±ÈÈç555.55500000003
ÎÞÄÎÖ»ÄÜдÕâ¸ö·½·¨
function round(a,b){
var s=a.toString().indexOf(".");
a0=a.toString().substr(0,s+b+1);
a1=Math.round(a.toString().sub ......

JavaScript³£Ó÷½·¨×ܽᗗÍøÒ³³£ÓÃС¼¼ÇÉ

ÍøÒ³³£ÓÃС¼¼ÇÉ
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return fa ......

JavaScript³£Ó÷½·¨×ܽᗗ¶ÔÏó Êý×é

B.1 anchor¶ÔÏó
¡¡¡¡Ê¹ÓÃ<A NAME=>±ê¼Ç´´½¨µÄhtmlÃèµãÄܱ»Ò»¸öÁ´½Ó×÷ΪĿ±êÈç¹ûêµã°üÀ¨HREF=ÌØÐÔ,ÔòËüÒ²ÊÇÒ»¸öÁ´½Ó¶ÔÏó¡£
¡¡¡¡anchor¶ÔÏóÊÇdocument¶ÔÏóµÄÒ»¸öÊôÐÔ,Ëü±¾ÉíûÓÐÊôÐÔ·½·¨»òÕßʼþ´¦Àí³ÌÐò¡£
¡¡¡¡B.2 anchorsÊý×é
¡¡¡¡anchorsÊý×éÊÇdocument¶ÔÏóµÄÒ»¸öÊôÐÔ,ÊÇÎĵµÄÚËùÓÐanchor¶ÔÏóµÄÒ»¸öÁбíÈç¹ ......

JavaScript³£Ó÷½·¨×ܽᗗÅжÏä¯ÀÀÆ÷ÀàÐÍ

ÅжÏä¯ÀÀÆ÷ÀàÐÍ
<SCRIPT language=javascript>
if(navigator.appVersion.indexOf("MSIE 6.") != -1 ){
window.location = "111.htm" ;
}
</SCRIPT>
°´Å¥±³¾°Í¼Æ¬Ìæ»»
<input type=button style="background-image:url(a.gif)" value=test onmouseover="this.style.backgroundImage='url(b.gif ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ