原創(chuàng)|使用教程|編輯:龔雪|2016-04-27 09:12:27.000|閱讀 584 次
概述:jQuery EasyUI致力于幫助web開發(fā)者更輕松的打造出功能豐富并且美觀的UI界面。本文主要為大家介紹如何創(chuàng)建一個(gè)簡單的窗口。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
Kendo UI for jQuery——?jiǎng)?chuàng)建現(xiàn)代Web應(yīng)用程序的最完整UI庫!查看詳情>>>
創(chuàng)建一個(gè)窗口非常簡單,我們創(chuàng)建一個(gè) DIV 標(biāo)記:
<div id="win" class="easyui-window" title="My Window" style="width:300px;height:100px;padding:5px;"> Some Content. </div>
現(xiàn)在運(yùn)行測試頁面,您會(huì)看見一個(gè)窗口顯示在您的屏幕上。我們不需要寫任何的javascript代碼。
如果您希望創(chuàng)建一個(gè)隱藏的窗口,記得將 'closed' 屬性設(shè)置為 'true' 值,您可以調(diào)用 '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');
作為最后的實(shí)例演示,我們創(chuàng)建一個(gè)登錄窗口:
<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示例:
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)