bootstrap弹窗、弹出层、modal

 bootstrap弹窗、弹出层、modal

引入bootstrap的js文件    如下div代码

<div class="modal fade" id="myModal2" style="background-color: #D5D5D5;font-size: .4cm;width: 350px;height: 300px;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" >
        <div class="modal-content">
             <div style="margin-top: 20px;margin-left: 10px;">设置管理密码</div>
           <div>
                <div style="margin-left: 22px;margin-top: 30px;">
                                              输入旧密码<input type="password" id='pswds' placeholder="请输入旧密码" autocomplete="off" style="width: 166px;height:30px;border:1px solid transparent;border-radius: 8px;margin-left: 10px;"/>
                </div>
                <div style="margin-left: 22px;margin-top: 10px;">
                                               输入新密码<input type="password" id='pswds1' placeholder="请输入密码" autocomplete="off" style="width: 166px;height:30px;border:1px solid transparent;border-radius: 8px;margin-left: 10px;"/>
                </div>
                <div style="margin-left: 10px;margin-top: 10px;">
                                               再次输入密码<input type="password" id='pswds2' placeholder="请再次输入密码" autocomplete="off" style="width: 166px;height:30px;border:1px solid transparent;border-radius: 8px;margin-left: 10px;"/>
                </div>
           </div>
          <div style="clear: both;"></div>
             <div style="width: 100%;margin-top: 20px;" align="center">
                 <input type="button" id="b1" value="登&nbsp;&nbsp;路" οnmοuseοut="seout('b1');"  οnmοuseοver="seover('b1');" οnclick="save2();" style="background-color:#1C86EE;width:88px;height: 38px;color: white;padding-left: 0px;border: 1px solid transparent;outline: none;border-radius: 6px;"/>
                 &nbsp;&nbsp;&nbsp;&nbsp;
                 <input type="button" id="b2" value="取&nbsp;&nbsp;消" οnmοuseοut="seout('b2');"  οnmοuseοver="seover('b2');" οnclick="myModalClo2();" style="background-color:#1C86EE;width:88px;height: 38px;color: white;padding-left: 0px;border: 1px solid transparent;outline: none;border-radius: 6px;"/>
             </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
  $('#myModal3').modal('show');
   $('#myModal3').modal('hide');

 开始关闭触发事件

        $('#myModal').on('hide.bs.modal', function () {
              // 执行一些动作...
              $("#myModal").css("pointer-events","none");
            })
                
        $('#myModal').on('show.bs.modal', function () {
          // 执行一些动作...
            $("#myModal").css("pointer-events","auto");
        })

 防止点击其他地方关闭弹窗问题

加上如下标签即可

data-backdrop="static"

 

转载于:https://www.cnblogs.com/qq376324789/p/10718287.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值