ready
English [?r?di]
adj. ???, ???, ???
vt.
?.??
jquery ??() ??? ???
??: ready ???? DOM(Document Object Model)? ???? ???(??? ??)? ??? ????? ?????. ? ???? ??? ??? ?? ????? ?? ?? jQuery ???? ??? ? ???? ???? ?? ????. ?? ?? ????. Ready() ??? Ready ???? ??? ? ??? ??? ?????. Ready() ??? ?? ????? ????? ???? ???? ????.
?? 1: $(document).ready(function)
?? 2: $().ready(function
?? 3: $(function)
????:
Parameters | Description |
function | ??. ??? ??? ? ??? ??? ?????. jquery ??() ??? ?<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".btn1").click(function(){ $("p").slideToggle(); }); }); </script> </head> <body> <p>This is a paragraph.</p> <button class="btn1">Toggle</button> </body> </html> ??? ????? ??? "???? ??" ??? ????? |