JS动态获取浏览器宽度和高度 $(window).resize(function() { var width = $(this).width(); var height = $(this).height(); });