JS¼¼Êõ

JavaScript×¼Ôò_Javascript½Ì³Ì(3)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2015-10-03 08:05 ÎÒÒªÆÀÂÛ( )

myscript = function(){ var config = { navigationID:'nav', visibleClass:'show' }; var nav = document.getElementById(config.navigationID); function init(){ show(); if(nav.className === config.visibleCl

myscript = function(){
var config = {
navigationID:'nav',
visibleClass:'show'
};
var nav = document.getElementById(config.navigationID);
function init(){
show();
if(nav.className === config.visibleClass){
reset();
};
// do stuff
};
function show(){
var c = nav.className;
// do stuff
};
function reset(){
// do stuff
};
}();
ÕâÑùά»¤Õß¾ÍÖªµÀÈ¥ÄÄÀïÐÞ¸ÄÕâЩÊôÐÔ£¬¶ø²»ÐèÒª¸Ä¶¯ÆäËû´úÂë¡£

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • ѧϰJavaScriptÖ®this,call,apply

    ѧϰJavaScript֮this,call,apply

    2016-01-28 20:45

  • Áã»ù´¡ÈëÃÅѧϰPython£¨10£©£ºº¯Êý - qq_33256568µÄ²©¿Í - ²©¿ÍƵµÀ - CSDN.NET qq_3

    Áã»ù´¡ÈëÃÅѧϰPython£¨10£©£ºº¯Êý - qq_33256568µÄ²©¿Í - ²©¿ÍƵµÀ

    2015-12-15 09:04

  • Swift 2.0ѧϰ±Ê¼Ç£¨Day48£©¡ª¡ªÀàÐͼì²éÓëת»» - ¹Ø¶«Éý - ²©¿ÍƵµÀ - CSDN.NET ¹Ø¶«Éý iO

    Swift 2.0ѧϰ±Ê¼Ç£¨Day48£©¡ª¡ªÀàÐͼì²éÓëת»» - ¹Ø¶«Éý - ²©¿ÍƵµÀ

    2015-12-14 18:16

  • ÓÐȤµÄRuby-ѧϰ±Ê¼Ç1 - ÎÒ¿ÉÒÔ½ÓÊÜʧ°Ü£¬µ«ÎÒ²»ÄܽÓÊÜ·ÅÆú¡£--Âõ¿Ë¶û Çǵ¤ - ²©¿ÍƵµÀ - CSDN.NET

    ÓÐȤµÄRuby-ѧϰ±Ê¼Ç1 - ÎÒ¿ÉÒÔ½ÓÊÜʧ°Ü£¬µ«ÎÒ²»ÄܽÓÊÜ·ÅÆú¡£--Âõ¿Ë

    2015-12-14 17:17

ÍøÓѵãÆÀ
¾