load
English [l??d]
n.Load; ????; ???, ???
vi .?? ?
;jquery ??() ??? ???
??: ??? ??(? ?? ??)? ???? load() ???? ?????. ? ???? URL? ?? ?? ??(?: ???, ????, ???, iframe)? ?????. ????(Firefox ? IE)? ?? ???? ??? ?? ?? ???? ???? ?? ? ????. ??? ????? ???? load()?? jQuery Ajax ???? ????.
??: ??$(selector).load(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(){ $("img").load(function(){ $("div").text("圖像已加載"); }); }); </script> </head> <body> <img src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" /> <div>圖像正在加載中 ...</div> <p><b>注釋:</b>根據(jù)不同的瀏覽器(Firefox 和 IE),如果圖像已被緩存,則也許不會觸發(fā) load 事件。</p> </body> </html>
??? ????? ??? "???? ??" ??? ?????