EasyUI my first window

Source: Internet
Author: User

@ Author YHC

Creating a window is very simple. We create a DIV tag.


[Html]
<Div id = "win" class = "easyui-window" title = "My Window" style = "width: 300px; height: 100px; padding: 5px;">
Some Content.
</Div>

<Div id = "win" class = "easyui-window" title = "My Window" style = "width: 300px; height: 100px; padding: 5px;">
Some Content.
</Div> run your test page now and you will see a window on your screen. We do not need to write any javascript code.

 


If you want to create a hidden window, remember to set the 'closed 'attribute to true. You can call the 'open' method to open a window.


[Html]
<Div id = "win" class = "easyui-window" title = "My Window" closed = "true" style = "width: 300px; height: 100px; padding: 5px; ">
Some Content.
</Div>

<Div id = "win" class = "easyui-window" title = "My Window" closed = "true" style = "width: 300px; height: 100px; padding: 5px; ">
Some Content.
</Div> [javascript] view plaincopyprint? $ ('# Win'). window ('open ');

$ ('# Win'). window ('open'); the final example is to create a logon form:


[Html]
<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>

<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>

 

 
Author: yhc13429826359
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.