function progress(){ $('.div5 .progress-bar').animate({width:'+=30px'}); } $('.test').click(function(){ $('.div5').show(); int=setInterval('progress()',1000); }); 這個progress-bar元素寬度每秒增加30px,當寬度到達某個數值就清除這個定時器,如何動態獲取這個progress-bar的寬度呢
js動態獲取元素寬度問題
qq_笑_17
2018-09-12 10:18:30