scroll
English [skr??l] American [skro?l]
n. (??? ??? ?? ???) ?? ????, ?? ????, ????(??); . ??? ???? (??? ?)? ??? ??? ?????
vi (?????) ??? ???? ?????.
jquery ???() ??? ???
??: ???? ??? ??? ????? ??? ???? ?????. ??? ???? ??? ??? ?? ??? ? ??(???? ?)? ?????. scroll() ???? ??? ???? ?????? ??? ???? ??? ? ??? ??? ?????.
??? ??? ???: $(selector).scroll()
??? ??? ???? ???: $(selector).scroll(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"> x=0; $(document).ready(function(){ $("div").scroll(function() { $("span").text(x+=1); }); }); </script> </head> <body> <p>請?jiān)囍鴿L動 DIV 中的文本:</p> <div style="width:200px;height:100px;overflow:scroll;">text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. <br /><br /> text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text. text.</div> <p>滾動了 <span>0</span> 次。</p> </body> </html>
??? ????? ??? "???? ??" ??? ?????