当前位置: 首页 > news >正文

苏州网站排名/seo翻译

苏州网站排名,seo翻译,机关门花网站建设,互联网平面设计是干什么的完整的参考菜鸟教程:http://www.runoob.com/bootstrap/bootstrap-modal-plugin.html 1.手动开启与关闭模态框的方法 按钮开启与JS函数开启(2种) <!DOCTYPE html> <html><head><meta charset"utf-8"><title>Bootstrap 实例 - 模态框&a…

 

完整的参考菜鸟教程:http://www.runoob.com/bootstrap/bootstrap-modal-plugin.html

 

1.手动开启与关闭模态框的方法  按钮开启与JS函数开启(2种)

<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>Bootstrap 实例 - 模态框(Modal)插件</title><link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"><script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script><script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script></head><body><h2>创建模态框(Modal)</h2><!-- 按钮触发模态框 --><button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal1">按钮开启
</button><a href="javascript:void(0)" class="btn btn-default" onclick="openMotai()">JS函数开启</a><script type="text/javascript">function openMotai(){alert("准备开启");$("#myModal1").modal('show');  //手动开启
                alert("准备关闭");$("#myModal1").modal('hide');  //手动关闭
                alert("准备开启");$("#myModal1").modal();  //手动开启
            }</script><!-- 模态框(Modal) --><div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header">
              <!--关闭符号-->
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel">模态框(Modal)标题</h4></div><div class="modal-body">username:<input type="text" name="" id="" value="" /><br /> password:<input type="password" name="" /></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">关闭</button><button type="button" class="btn btn-primary">提交更改</button></div></div><!-- /.modal-content --></div><!-- /.modal --></div></body></html>

 

 

2.有时候我们希望点击esc或者点击模态框外部的时候不会关闭

<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>Bootstrap 实例 - 模态框(Modal)插件</title><link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"><script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script><script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script></head><body><h2>创建模态框(Modal)</h2><!-- 按钮触发模态框 --><button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal1">按钮开启
</button><a href="javascript:void(0)" class="btn btn-default" onclick="openMotai()">JS函数开启</a><script type="text/javascript">function openMotai(){/*alert("准备开启");$("#myModal1").modal('show');  //手动开启alert("准备关闭");$("#myModal1").modal('hide');  //手动关闭alert("准备开启");$("#myModal1").modal();  //手动开启*/$("#myModal1").modal({backdrop: 'static', keyboard: false});  //手动开启
                }</script><!-- 模态框(Modal) --><div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header">
              <!-- 关闭符号(叉号) -->
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel">模态框(Modal)标题</h4></div><div class="modal-body">username:<input type="text" name="" id="" value="" /><br /> password:<input type="password" name="" /></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">关闭</button><button type="button" class="btn btn-primary">提交更改</button></div></div><!-- /.modal-content --></div><!-- /.modal --></div></body></html>

 

 

分析:

$(‘#myModal’).modal({backdrop: ‘static’, keyboard: false});
其中 ,backdrop:’static’指的是点击背景空白处不被关闭;
keyboard:false指的是触发键盘esc事件时不关闭。

 

 

 

 

 

 

 

 

 

 

另一种方式是直接在模态框标签加::

<!-- 模态框黑名单单位添加-->
<div class="modal fade" id="myModal" role="dialog"
data-backdrop="static" data-keyboard="false" aria-labelledby="myModalLabel" aria-hidden="true">

 

转载于:https://www.cnblogs.com/qlqwjy/p/7491054.html

http://www.jmfq.cn/news/4999303.html

相关文章:

  • 做啥英文网站赚钱/旅行网站排名前十名
  • 前端网站建设插件/友链交换网站源码
  • 有没有免费的网站空间/优化疫情防控 这些措施你应该知道
  • 网站域名怎么进行实名认证/seo搜索引擎优化工资
  • 做视频网站注意什么/网络营销到底是干嘛的
  • 商丘网站制作案例/搜索引擎营销的常见方式
  • 江苏省网站备案查询/常用的网络推广的方法有哪些
  • 桂林做网站哪家好/百度推广一般要多少钱
  • 沈阳网站开发公司/网站代运营多少钱一个月
  • 亚马逊网站建设做什么/网络推广什么做
  • vb做的网站怎么调试/医院网站建设方案
  • 中国建设银行邵阳分行网站/2022今日最新军事新闻
  • 开发者模式对手机有伤害吗/网站seo的主要优化内容
  • 阳江房地产信息网官方网站/杨谦教授编的营销课程
  • 东莞 网站建设/安卓手机性能优化软件
  • z-blog做企业网站/哪个平台可以买卖链接
  • 网页的首页/南京百度快速排名优化
  • 涉县网站开发/安阳企业网站优化外包
  • 莱芜市网站建设/每天看七个广告赚40元的app
  • Wix做的网站在国内打不开/十大网络推广公司
  • 主题资源网站建设反思/百度推广后台登陆
  • 网站建设哪家公司便宜/新闻热点事件2021(最新)
  • 广州小型企业网站建设/西安网络优化大的公司
  • 做网站需要编程/宜昌网站seo收费
  • 武汉江汉路网站建设/天津提升专业关键词排名
  • 用ps做网站首页/抖音seo系统
  • 南京高端网站建设公司哪家好/哪有学电脑培训班
  • 模板网站的网站如何打开里面的其他网站/网络营销软件下载
  • 自动的小企业网站建设/seo网站推广优化论文
  • 以前的网站忘了怎么办啊/产品推广计划