<! 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-type" content = "text/html; charset = utf-8"/> <title> 无标题文档 </title> </head> <script src = "jquery-1.8.2. 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 ('фон', 'red'); $ ('#buttom1'). Высота (i1); i1 ++; if (i1 == 30) {clearInterval (interID1);}}}); </script> <body> <style> .container {ширина: 20px; высота: 50px; граница: 1px solid #999; font-size: 10px; float; слева; Margin-left: 5px;} </style> </div onclick = javscript = "div onclick =" javascripct javscript = "div onclick =" div onclick = "div onclick = > <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>