//设置自适应浏览器宽度和高度 function setLayoutHeight() { var height = $(window).height() - 20; $("#main_layout").attr("style", "100%;height:" + height + "px"); $("#main_layout").layout("resize", { "100%", height: height + "px" }); }