<script type="text/javascript">
var setinterval;
function showInc()
{
setinterval = setInterval("add()",100);
}
function add()
{
var ddd = document.getElementById("divv");
var width = parseInt(ddd.style.width,10);
var height = parseInt(ddd.style.height, 10);
width = width + 10;
height = height + 10;
if (width>500) {
clearInterval(setinterval);
}
ddd.style.width = width + "px";
ddd.style.height = height + "px";
}
</script>
</head>
<body>
<div id="divv" style="border:1px solid #0d0c0c;200px;height:200px">
画鸡
<table>
<tr>
<td>头上红冠不用彩,</td>
</tr>
<tr>
<td>满身雪白走将来。</td>
</tr>
<tr>
<td>平生不敢轻言语,</td>
</tr>
<tr>
<td> 一叫千门万户开。</td>
</tr>
</table>
</div>
<input type="button" value="动态增加" onclick="showInc();"/>
</body>