jquery widgets 弹框

本文介绍了一个使用jQuery插件实现的自定义对话框功能,包括显示、关闭操作及验证码验证等特性。
<div id='dialog' style="display:none;">
    <div style="text-align:center;">
        <h3 style="color: red; padding: 8px; margin-top: -12px;">请确认是否重置假日信息</h3>
        <input style="margin-top:5px;width:80px;" id="yzm" />&nbsp;验证码:<span id="jsYzm"></span>
        <br /><br />
        <button id="btnEnter" style="cursor:pointer" class="btn btn-default">确定</button>
        <button id="btnCancel" style="cursor:pointer" class="btn btn-default">取消</button>
    </div>
</div>

js

jqxWindow("#dialog", "&nbsp;", 360, "auto");

 

 

function jqxWindow(selector, title, width, height, icon) {
    $(selector).show();
    $(selector).removeClass("hide");
    if ($(selector).find(".jqx-window-content").size() > 0) {
        $(selector).jqxWindow("open");
    } else {
        $(selector).jqxWindow({ width: width, height: height, isModal: true, modalOpacity: 0.3, resizable: false, maxWidth: 1300 });
    }
    if (icon != null) {
        title = "<i class=\"" + icon + "\" style=\"color: #F2B863;font-size: 20px; margin-right: 8px; \"></i>" + title;
    }
    $(selector).jqxWindow('setTitle', title);
    $(selector).on('close', function (event) {
        jqxValidateRemove();
    });
    $(selector).on('moving', function (event) {
        jqxValidateRemove();
    });

    $.position.center(selector);
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值