bootstrap4简单使用和入门02-bootstrap的js组件简单使用
自带默认的css和js弹框控制

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>modal</title>
<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="bootstrap-4.0.0-dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" type="text/css" href="bootstrap-4.0.0-dist/css/bootstrap.min.css">
</head>
<body> <!-- css自带弹窗处理 -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
弹窗1
</button> <!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div> </body>
</html>
自己使用jquery控制弹窗

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>modal</title>
<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="bootstrap-4.0.0-dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" type="text/css" href="bootstrap-4.0.0-dist/css/bootstrap.min.css">
</head>
<body> <!-- css自带弹窗处理 -->
<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
弹窗1
</button> -->
<!-- js控制弹窗 -->
<button id="myModal" class="btn btn-info">弹窗2</button> <!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div> <script type="text/javascript">
$('#myModal').on('click', function () {
$('#exampleModal').modal('show');
})
</script> </body>
</html>
bootstrap4简单使用和入门02-bootstrap的js组件简单使用的更多相关文章
- 【Bootstrap基础学习】02 Bootstrap的布局组件应用示例
字体图标的应用示例 <button type="button" class="btn btn-default"> <span class=&q ...
- JS组件系列——表格组件神器:bootstrap table
前言:之前一直在忙着各种什么效果,殊不知最基础的Bootstrap Table用法都没有涉及,罪过,罪过.今天补起来吧.上午博主由零开始自己从头到尾使用了一遍Bootstrap Table ,遇到不少 ...
- JS组件系列——表格组件神器:bootstrap table(二:父子表和行列调序)
前言:上篇 JS组件系列——表格组件神器:bootstrap table 简单介绍了下Bootstrap Table的基础用法,没想到讨论还挺热烈的.有园友在评论中提到了父子表的用法,今天就结合Boo ...
- JS组件系列——表格组件神器:bootstrap table(三:终结篇,最后的干货福利)
前言:前面介绍了两篇关于bootstrap table的基础用法,这章我们继续来看看它比较常用的一些功能,来个终结篇吧,毛爷爷告诉我们做事要有始有终~~bootstrap table这东西要想所有功能 ...
- [转]JS组件系列——表格组件神器:bootstrap table
原文地址:https://www.cnblogs.com/landeanfen/p/4976838.html 前言:之前一直在忙着各种什么效果,殊不知最基础的Bootstrap Table用法都没有涉 ...
- JS组件系列——表格组件神器:bootstrap table 包含了js对象的定义和对象成员函数的定义
前言:之前一直在忙着各种什么效果,殊不知最基础的Bootstrap Table用法都没有涉及,罪过,罪过.今天补起来吧.上午博主由零开始自己从头到尾使用了一遍Bootstrap Table ,遇到不少 ...
- CSS3基础入门02
CSS3 基础入门02 边框相关属性 border-radius 通过这个属性我们可以设置边框圆角,即可以将四个角设置为统一的圆角,也可以单独的设置具体的某一个角的圆角. grammer: borde ...
- Bootstrap入门(二十一)组件15:警告框
Bootstrap入门(二十一)组件15:警告框 通过这些简单.灵活的进度条,为当前工作流程或动作提供实时反馈. 进度条组件使用了 CSS3 的 transition 和 animation 属性来完 ...
- Bootstrap入门(二十)组件14:警告框
Bootstrap入门(二十)组件14:警告框 警告框组件通过提供一些灵活的预定义消息,为常见的用户动作提供反馈消息,提示.通知或者警示,可以迅速吸引注意力. 1.情景警告框 2.可关闭的警告框 3. ...
随机推荐
- flask异步
demo def runFlask(port): init() app.config[' app.run(port=port, threaded=True) CORS(app, supports_cr ...
- GeoGlobe Server运维
本篇博文简单记录鄙人在管理和维护GeoGlobe Server中,遇到的一些问题以及可行的解决方案 1 关于启动内存 Server默认的启动内存是256M,当服务比较多的时候,启动就会很慢.我们可以修 ...
- 四.HashSet原理及实现学习总结
在上一篇博文(HashMap原理及实现学习总结)详细总结了HashMap的实现过程,对于HashSet而言,它是基于HashMap来实现的,底层采用HashMap来保存元素.所以如果对HashMap比 ...
- ****** 二十八 ******、软设笔记【数据库】-分布式数据库、特点、数据存储、DBMS组成
分布式数据库 一.分布式数据库 分布式数据库由一组数据组成,这些数据物理上分布在计算机网络的不同结点(场地)上,逻辑上是属于同一个系统.每个结点可以执行局部应用,也能通过网络通信子 ...
- mysql 单表更新记录UPDATE
1.单表更新 (1)mysql> SELECT * FROM users;+----+----------+----------+-----+------+| id | username | ...
- 简单linux命令1
1. cat 一次显示整个文件: cat filename 从键盘创建一个文件: cat> filename 将文件合并: cat file1 file2 > filename 2. ...
- luogu P4148 简单题
传送门 这题真简单,直接把\(CDQ\)给ban掉了 其实数据范围比较小可以直接二维树状数组,我们看数据范围,发现点的个数比N还小,可以考虑用一些奇怪的数据结构 说的就是你,\(KD tree\) \ ...
- mysql报错:Cause: com.mysql.jdbc.PacketTooBigException
报错信息: Error updating database. Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too ...
- SQLQueryStress
工具介绍及使用链接:http://www.cnblogs.com/lyhabc/p/3187922.html 工具下载链接:http://files.cnblogs.com/files/coce/sq ...
- STL之partition学习
顺便存一下numeric函数的使用方法吧,感觉用处不大. https://blog.csdn.net/baishuo8/article/details/84073565 partition函数,将元素 ...