代码如下:<!DOCTYPE HTML><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>图案动态效果</title> <style type="text/css"> div { width: 300px; height: 150px; background: yellow; border:2px solid red; } </style> <script type="text/javascript"> function add() { var wid=300 while(wid<1000) { var bbb=document.getElementById("aaa") bbb.style.width="wid+'px'"; wid++; } } </script> </head> <body> <div id="aaa"></div> <button onclick="add()">+++</button> </body></html>求前辈指点,出什么问题啦???
添加回答
举报
0/150
提交
取消