jQuery EasyUI 教程
創(chuàng)建一個(gè)窗口(window)非常簡(jiǎn)單,我們創(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)行測(cè)試頁(yè)面,您會(huì)看見一個(gè)窗口(window)顯示在您的屏幕上。我們不需要寫任何的 javascript 代碼。
如果您希望創(chuàng)建一個(gè)隱藏的窗口(window),記得設(shè)置 'closed' 屬性為 'true' 值,您可以調(diào)用 'open' 方法來(lái)打開窗口(window):
<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è)登錄窗口(window):
<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>