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

JavaScriptÅжÏä¯ÀÀÆ÷ÀàÐͼ°°æ±¾

      ÄãÖªµÀÊÀ½çÉÏÓжàÉÙÖÖä¯ÀÀÆ÷Â𣿳ýÁËÎÒÃÇÊìÖªµÄIE, Firefox, Opera, SafariËÄ´óä¯ÀÀÆ÷Ö®Í⣬ÊÀ½çÉÏ»¹Óнü°ÙÖÖä¯ÀÀÆ÷¡£
       ¼¸ÌìÇ°£¬ä¯ÀÀÆ÷¼Ò×åÓиյ®ÉúÁËһλСÍõ×Ó£¬¾ÍÊÇGoogleÍƳöµÄChromeä¯ÀÀÆ÷¡£ÓÉÓÚChrome³öÉúÃûÃÅ£¬¾¡¹ÜËû»¹ÊǸöС¼Ò»ï£¬Ã»ÓÐÈ˸ÒС¿´Ëû¡£ÒÔºó£¬ÔÛÃdz£Ëµä¯ÀÀÆ÷µÄ“ËÄ´ó²Å×Ó”¾ÍµÃ¸Ä³ÆΪ“Îå¶ä½ð»¨”ÁË¡£
       ÔÚÍøվǰ¶Ë¿ª·¢ÖУ¬ä¯ÀÀÆ÷¼æÈÝÐÔÎÊÌâ±¾ÒÑÈÃÎÒÃÇÊÖæ½ÅÂÒ£¬ChromeµÄ³öÊÀ²»ÖªµÀÓÖÒª¸øÎÒÃÇÌí¶àÉÙÂÒ×Ó¡£ä¯ÀÀÆ÷¼æÈÝÐÔÊÇÇ°¶Ë¿ª·¢¿ò¼ÜÒª½â¾öµÄµÚÒ»¸öÎÊÌ⣬Ҫ½â¾ö¼æÈÝÐÔÎÊÌâ¾ÍµÃÊ×ÏÈ׼ȷÅжϳöä¯ÀÀÆ÷µÄÀàÐͼ°Æä°æ±¾¡£
       JavaScriptÊÇÇ°¶Ë¿ª·¢µÄÖ÷ÒªÓïÑÔ£¬ÎÒÃÇ¿ÉÒÔͨ¹ý±àдJavaScript³ÌÐòÀ´ÅжÏä¯ÀÀÆ÷µÄÀàÐͼ°°æ±¾¡£JavaScriptÅжÏä¯ÀÀÆ÷ÀàÐÍÒ»°ãÓÐÁ½ÖÖ°ì·¨£¬Ò»ÖÖÊǸù¾Ý¸÷ÖÖä¯ÀÀÆ÷¶ÀÓеÄÊôÐÔÀ´·Ö±æ£¬ÁíÒ»ÖÖÊÇͨ¹ý·ÖÎöä¯ÀÀÆ÷µÄuserAgentÊôÐÔÀ´Åжϵġ£ÔÚÐí¶àÇé¿öÏ£¬ÖµÅжϳöä¯ÀÀÆ÷ÀàÐÍÖ®ºó£¬»¹ÐèÅжÏä¯ÀÀÆ÷°æ±¾²ÅÄÜ´¦Àí¼æÈÝÐÔÎÊÌ⣬¶øÅжÏä¯ÀÀÆ÷µÄ°æ±¾Ò»°ãÖ»ÄÜͨ¹ý·ÖÎöä¯ÀÀÆ÷µÄuserAgent²ÅÄÜÖªµÀ¡£
       ÎÒÃÇÏÈÀ´·ÖÎöһϸ÷ÖÖä¯ÀÀÆ÷µÄÌØÕ÷¼°ÆäuserAgent¡£
       IE
      Ö»ÓÐIEÖ§³Ö´´½¨ActiveX¿Ø¼þ£¬Òò´ËËýÓÐÒ»¸öÆäËûä¯ÀÀÆ÷ûÓеĶ«Î÷£¬¾ÍÊÇActiveXObjectº¯Êý¡£Ö»ÒªÅжÏwindow¶ÔÏó´æÔÚActiveXObjectº¯Êý£¬¾Í¿ÉÒÔÃ÷È·Åжϳöµ±Ç°ä¯ÀÀÆ÷ÊÇIE¡£¶øIE¸÷¸ö°æ±¾µäÐ͵ÄuserAgentÈçÏ£º
        Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)
        Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2)
        Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
        Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)
      ÆäÖУ¬°æ±¾ºÅÊÇMSIEÖ®ºóµÄÊý×Ö¡£
       Firefox
       FirefoxÖеÄDOMÔªËض¼ÓÐÒ»¸ögetBoxObjectForº¯Êý£¬ÓÃÀ´»ñÈ¡¸ÃDOMÔªËصÄλÖúʹóС£¨IE¶ÔÓ¦µÄÖÐÊÇgetBoundingClientRectº¯Êý£


Ïà¹ØÎĵµ£º

javascriptµ÷Óø¸´°¿ÚµÄº¯ÊýºÍ±äÁ¿


javascriptµ÷Óø¸´°¿ÚµÄº¯ÊýºÍ±äÁ¿
·¢²¼ÈÕÆÚ£º2008-05-28×î½ü¸üУº2008-05-28À´Ô´£ºBHCODE×÷Õߣº
web¿ª·¢µÄʱºò£¬ÓÐʱºòÐèҪʹÓÃÆäËûÒ³ÃæÉÏдºÃµÄjavasriptº¯Êý¡¢±äÁ¿¡£È絯³ö´°¿ÚÐèҪʹÓø¸´°¿ÚÖеĺ¯Êý£¬¿ò¼Ü1ÐèҪʹÓÿò¼Ü2Öеĺ¯Êý¡£
µ÷Óú¯Êý¡¢±äÁ¿µÄ·½·¨Ò»Ñù£¬¶¼ÊÇÐèÒªÊ×ÏÈ»ñµÃÄãÐèÒªµ÷Óõĺ¯ÊýËùÔÚµÄwindow¶ÔÏó ......

Javascript´úÂëʵÏÖͼƬ²£Á§ÌØЧ

ÎļþÄÚÈÝÈçÏ£º£¨Á½¸öÎļþglossy.jsºÍglossy.html£©
/**********************************  glossy.js  ***********************************/
 /**
* glossy.js 1.31 (19-Jul-2007)
* (c) by Christian Effenberger
* All Rights Reserved
* Source: glossy.netzgesta.de
* Distrib ......

JavaScript isNaN() º¯Êý


·µ»Ø JavaScript È«¾Ö¶ÔÏó²Î¿¼ÊÖ²á
¶¨ÒåºÍÓ÷¨
isNaN() º¯ÊýÓÃÓÚ¼ì²éÆä²ÎÊýÊÇ·ñÊÇ·ÇÊý×ÖÖµ¡£
Óï·¨
isNaN(x)
²ÎÊýÃèÊö
x
±ØÐè¡£Òª¼ì²âµÄÖµ¡£
·µ»ØÖµ
Èç¹û x ÊÇÌØÊâµÄ·ÇÊý×ÖÖµ NaN£¨»òÕßÄܱ»×ª»»ÎªÕâÑùµÄÖµ£©£¬·µ»ØµÄÖµ¾ÍÊÇ true¡£Èç¹û x ÊÇÆäËûÖµ,Ôò·µ»Ø false¡£
˵Ã÷
isNaN() º¯Êý¿ÉÓÃÓÚÅжÏÆä²ÎÊýÊÇ·ñÊÇ NaN£ ......

JavascriptÔÚÒ³Ãæ¼ÓÔØʱµÄÖ´ÐÐ˳Ðò

Ò»¡¢ÔÚHTMLÖÐǶÈëJavasriptµÄ·½·¨
Ö±½ÓÔÚJavascript´úÂë·ÅÔÚ±ê¼Ç¶Ô<script>ºÍ</script>Ö®¼ä
ÓÉ<script />±ê¼ÇµÄsrcÊôÐÔÖƶ¨ÍⲿµÄjsÎļþ
·ÅÔÚʼþ´¦Àí³ÌÐòÖУ¬±ÈÈ磺<p onclick="alert('ÎÒÊÇÓÉonclickʼþÖ´ÐеÄJavascript')">µã»÷ÎÒ</p>
×÷ΪURLµÄÖ÷Ì壬Õâ¸öURLʹÓÃÌØÊâµÄJavascript ......

¹ØÓÚjavascript ÄäÃûº¯ÊýµÄµ÷Ó÷½Ê½

½ñÌì¿´jQueryµÄʱºò·¢ÏÖµÄÊéдÐÎʽԭÀ´Ã»Óмû¹ý ÈçÏ£º
(function(){
statement
...
})();
²»Àí½â£¬ºóÀ´ÉÏÍø²éÁËһϣ¬Ô­À´ÊÇjavascriptÄäÃûº¯ÊýµÄµ÷Ó÷½Ê½
 http://zhidao.baidu.com/question/95789340.html
javascript ¿ÉÒÔÒÔÏ·½Ê½µ÷Óú¯Êý
ÉùÃ÷
a = function(){};
µ÷ÓÃ
a();
¿ÉÒÔÀí½âΪ
(function(){ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ