onresize检测不到啊.
例如:
<div id="dd" style="overflow:hidden;width:200;height:100;border:1px solid black;" onresize="alert('检测到了')"></div>
<input type="button" onclick="dd.innerHTML += '这是测试DDDDD'">没有反应
例如:
<div id="dd" style="overflow:hidden;width:200;height:100;border:1px solid black;" onresize="alert('检测到了')"></div>
<input type="button" onclick="dd.innerHTML += '这是测试DDDDD'">没有反应
onresize:Fires when the size of the <DIV> is about to change. 层的大小改变时触发。
onscroll:Fires when the user repositions the scroll box in the scroll bar on the <DIV>.滚动条被滑动时触发,楼主试试看。
onpropertychange 当对象的属性之一发生变化时触发的事件