EasyUI 我的第一个窗口

建立窗口时很简单的,我们建立DIV标记:

<div id="win" class="easyui-window" title="My Window" style="300px;height:100px;padding:5px;">

    Some Content.

</div>

然后测试就出出现一个窗口,我们不用写任何js代码

如果你想建立看不见的窗口,记住设置closed属性为true,你能调用open方法打开窗口:

<div id="win" class="easyui-window" title="My Window" closed="true" style="300px;height:100px;padding:5px;">

    Some Content.

</div>

$('#win').window('open');

这个演示,我们创建一个登陆窗口

<div id="win" class="easyui-window" title="Login" style="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>

原文地址:https://www.cnblogs.com/huangf714/p/5911824.html