您好,登錄后才能下訂單哦!
具體代碼如下所示:
<%@ 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> <h5 class="modal-title" id="exampleModalLabel">確認框</h5> </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實現點擊刪除按鈕彈出確認框的實例代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對億速云網站的支持!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。