文檔金喜正規買球>>jQuery EasyUI使用教程>>jQuery EasyUI使用教程:創建簡單窗口
jQuery EasyUI使用教程:創建簡單窗口
Kendo UI for jQuery——創建現代Web應用程序的最完整UI庫!查看詳情>>>
創建一個窗口非常簡單,我們創建一個 DIV 標記:
<div id="win" class="easyui-window" title="My Window" style="width:300px;height:100px;padding:5px;"> Some Content. </div>
現在運行測試頁面,您會看見一個窗口顯示在您的屏幕上。我們不需要寫任何的javascript代碼。

如果您希望創建一個隱藏的窗口,記得將 'closed' 屬性設置為 'true' 值,您可以調用 'open' 方法來打開窗口:
<div id="win" class="easyui-window" title="My Window" closed="true" style="width:300px;height:100px;padding:5px;"> Some Content. </div>
$('#win').window('open');
作為最后的實例演示,我們創建一個登錄窗口:
<div id="win" class="easyui-window" title="Login" style="width:300px;height:180px;"> <form style="padding:10px 20px 10px 40px;"> <p>Name: <input type="text"></p> <p>Pass: <input type="password"></p> <div style="padding:5px;text-align:center;"> <a href="#" class="easyui-linkbutton" icon="icon-ok">Ok</a> <a href="#" class="easyui-linkbutton" icon="icon-cancel">Cancel</a> </div> </form> </div>

下載EasyUI示例: