The best jQuery EasyUI window - Creating a simple window Tutorial In 2024, In this tutorial you can learn Download jQuery EasyUI examples,
Create a window (window) is very simple, we create a DIV tag:
<Div id = "win" class = "easyui-window" title = "My Window" style = "width: 300px; height: 100px; padding: 5px;"> Some Content. </ Div>
Now run the test page, you'll see a window (window) is displayed on your screen. We do not need to write any javascript code.
If you want to create a hidden window (window), remember to set the 'closed' property to 'true' value, you can call the 'open' method to open the window (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');
As a last example demonstrates, we create a login window (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>