<html><head><script type="text/javascript" src="/jquery/jquery.js"></script><script type="text/javascript">x=0;$(document).ready(function(){ $(window).resize(function() { $("span").text(x+=1); }); $("button").click(function(){ $(window).resize(); });});</script></head><body><p>窗口的大小被调整了 <span>0</span> 次。</p><p>请试着调整浏览器窗口的大小。</p><button>触发窗口的 resize 事件</button></body></html>