<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-ype" content = "text/html; charset = utf-8"/> <title> type = "text/javascript"> </script> <script type = "text/javascript"> $ (function () {interid = setInterval (showgao, 1); var i = 1; $ ('#top'). ความสูง (8); $ ('#buttom'). css ('Margintop', 42); $ ('#buttom'). css ('พื้นหลัง', '#d6d6d6'); $ ('#buttom'). ความสูง (i); $ (#buttom1 '). CSS (' พื้นหลัง ',' สีแดง '); $ ('#buttom1'). ความสูง (i1); i1 ++; if (i1 == 30) {clearInterval (interid1);}}}); </script> <body> <style> .container {width: 20px; ความสูง: 50px; เส้นขอบ: 1px ของแข็ง #999; font-size: 10px; > <div id = "top"> 82%</div> <div id = "buttom"> </div> </div> <div onclick = "JavaScript: Alert (1);" > <div id = "top1"> 62%</div> <div id = "buttom1"> </div> </div> </body> </html>