bootstrap实现点击删除按钮弹出确认框的实例代码
作者:Wj要努力 时间:2023-08-28 09:36:20
具体代码如下所示:
<%@ page language="java" import="com.student.servlet.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="java.util.*" import="com.student.vo.User"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" rel="external nofollow" />
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="bootstrap/bootstrap.min.js"></script>
</head>
<body>
<script type="text/javascript">
$('#myModal').on('shown.bs.modal', function () {
$('#myInput').focus()
})
</script>
<button type="button" class="btn btn-danger" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">删除</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">确认框</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="message-text" class="control-label">确定要删除联系人?</label>
</div>
</form>
</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>
</div>
</div>
</body>
</html>
总结
以上所述是小编给大家介绍的bootstrap实现点击删除按钮弹出确认框的实例代码,希望对大家有所帮助
来源:https://blog.csdn.net/dreamzuora/article/details/78954251
标签:bootstrap,弹出,框


猜你喜欢
mysql性能的检查和调优方法
2009-05-17 09:21:00
Python StringIO及BytesIO包使用方法解析
2022-12-24 15:34:26
JSON.stringify转换JSON时日期时间不准确的解决方法
2014-07-20 13:25:07

深入解析MySQL索引数据结构
2024-01-19 23:40:25

详解Python之可迭代对象,迭代器和生成器
2022-09-30 02:11:06

python采集天气数据并做数据可视化
2022-07-16 15:26:39

PHP date函数参数详解
2023-11-23 06:41:40
PHP获取数组中指定的一列实例
2024-05-08 09:38:33
总结Python编程中函数的使用要点
2021-03-15 01:49:52
t-sql/mssql用命令行导入数据脚本的SQL语句示例
2024-01-21 16:15:42
无法远程登入MySQL数据库的几种解决办法
2012-04-13 11:57:41
Python抓取今日头条街拍图片数据
2021-11-03 12:30:57

PyTorch训练LSTM时loss.backward()报错的解决方案
2022-01-10 00:04:09
Asp与JS的数组和字符串下标介绍
2022-10-11 13:40:25
Python 正则表达式匹配字符串中的http链接方法
2022-02-11 03:02:13
浅谈Python3中datetime不同时区转换介绍与踩坑
2021-05-16 15:29:46
python 二维数组90度旋转的方法
2021-05-18 20:16:19
laravel orm 关联条件查询代码
2024-03-08 02:57:53
基于Python编写一个宝石消消乐小游戏
2021-10-25 05:46:06
ASP 三层架构 Convert类实现代码
2011-03-16 11:01:00