原創|使用教程|編輯:龔雪|2016-04-27 09:12:27.000|閱讀 584 次
概述:jQuery EasyUI致力于幫助web開發者更輕松的打造出功能豐富并且美觀的UI界面。本文主要為大家介紹如何創建一個簡單的窗口。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
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示例:
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網