<!DOCTYPE html> <html> <head> <title>jQuery Easy UI</title> <meta charset="UTF-8" /> <script type="text/javascript" src="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/jquery.min.js"></script> <script type="text/javascript" src="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/jquery.easyui.min.js"></script> <script type="text/javascript" src="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/locale/easyui-lang-zh_CN.js" ></script> <link rel="stylesheet" type="text/css" href="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="C:/Users/秋萍/Desktop/easyui/jquery-easyui-1.5.1/themes/icon.css" /> <script type="text/javascript"> $(function(){ $("#box1").window({ width : 200, height : 200, modal : true,//是否将窗体显示为模块化窗口 collapsible : true,//是否显示可折叠按钮 minimizable : true,//是否显示最小化按钮 maximizable : true,//是否显示最大化 closable : true, closed : false,//定义是否关闭窗口 //zIndex : 200,//窗口Z轴坐标 draggable : true,//定义窗口能否可拖拽 resizable : true,//窗口能否改变大小 shadow : true,//是否显示阴影 inline : false,//是否显示在它的父容器上 // 窗口的时间完整继承自panel面板 //,当然也有新增的方法 }); $(document).click(function(){ $("#box1").window("hcenter"); $("#box1").window("center"); alert($("#box1").window("window")); }); }); </script> </head> <body> <!-- 这个组件依赖panel 组件 这个组件扩展了 panel 面板 --> <div id="box" class="" title="my window" style="300px;height:400px;" data-options="iconCls :'icon-save',modal:true,zIndex : 200"> 窗口 </div> <div id="box1"> 窗口2 </div> </body> </html>