jQuery¼¼Êõ

Hybrid App¿ª·¢Ö®jQuery»ù´¡(2)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-06-19 11:03 ÎÒÒªÆÀÂÛ( )

ºÍÉÏÃæÒ»Ñù£¬Ö±½Óд¸öСÀý×Ó£¬¿´ÏÂÈçºÎ¿ØÖÆcssÑùʽµÄ !DOCTYPE htmlhtml lang=enheadmeta charset=UTF-8titleJQuery¿ØÖÆcssÑùʽ/titlestyle type=text/css.normal{color: black;width: 150px;height: 30px;padding:

ºÍÉÏÃæÒ»Ñù£¬Ö±½Óд¸öСÀý×Ó£¬¿´ÏÂÈçºÎ¿ØÖÆcssÑùʽµÄ

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JQuery¿ØÖÆcssÑùʽ</title> <style type="text/css"> .normal{ color: black; width: 150px; height: 30px; padding: 5px; } .clicked{ color: blue; width: 150px; height: 30px; padding: 5px; } </style> <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script type="text/javascript"> //JQueryд·¨ $(function () { $("#changeCssBtn").click(function () { $(this).toggleClass("clicked") }); }); //´«Í³Ð´·¨ function changeCssBtnClick() { var className= document.getElementById("changeCssBtn").className; if(className=="clicked"){ document.getElementById("changeCssBtn").className="normal"; }else{ document.getElementById("changeCssBtn").className="clicked"; } } </script> </head> <body> <div > <button id="changeCssBtn" class="normal" onclick="changeCssBtnClick()">µã»÷ÐÞ¸ÄcssÑùʽ</button> </div> </body> </html> ×ܽ᣺

½ñÌì¼òµ¥Ñ§Ï°Ò»ÏÂJQueryµÄ»ù´¡¼°¼òµ¥Ê¹Óá£

·ÖÏí¸øС»ï°éÃÇ£º

±¾ÎıêÇ©£º Hybrid£¬jQuery/">Hybrid£¬jQuery

Ïà¹ØÎÄÕÂ

·¢±íÆÀÂÛÔ¸ÄúµÄÿ¾äÆÀÂÛ£¬¶¼Äܸø´ó¼ÒµÄÉú»îÌíÉ«²Ê£¬´øÀ´¹²Ãù£¬´øÀ´Ë¼Ë÷£¬´øÀ´¿ìÀÖ¡£

  • ±¾Àà×îÈÈÐÂÎÅ

  • ¡¡

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

    Ïà¹ØÎÄÕÂ
    • jQuery½Ì³Ì-jQueryÖеÄAjax²Ù×÷

      jQuery½Ì³Ì-jQueryÖеÄAjax²Ù×÷

      2017-06-19 10:04

    • ͼƬÑÓʱ¼ÓÔزå¼þjquery.lazyload.jsʹÓý̳Ì

      ͼƬÑÓʱ¼ÓÔزå¼þjquery.lazyload.jsʹÓý̳Ì

      2017-06-18 17:02

    • jQuery¸´ºÏʼþÓ÷¨Ê¾Àý

      jQuery¸´ºÏʼþÓ÷¨Ê¾Àý

      2017-06-18 17:00

    • ʹÓÃjQuery²¥·Å/ÔÝÍ£ HTML5ÊÓƵ

      ʹÓÃjQuery²¥·Å/ÔÝÍ£ HTML5ÊÓƵ

      2017-06-18 16:06

    ÍøÓѵãÆÀ
    ¼