Create message modal dialog

Description

The following code shows how to create message modal dialog.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.10.1.js'></script>
<script type='text/javascript'
  src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-modal.js"></script>
<link rel="stylesheet" type="text/css"
  href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css">
<script type='text/javascript'>
$(window).load(function(){<!--   ww w . j ava 2  s .  co  m-->
   $('#myModal2').modal('show');
});
</script>
</head>
<body>
  <a href="#myModal2" role="button" class="btn btn-warning"
    data-toggle="modal">Confirm</a>
  <div id="myModal2" class="modal hide fade" tabindex="-1" role="dialog"
    aria-labelledby="myModalLabel2" aria-hidden="true">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal"
        aria-hidden="true">&times;</button>
      <h3 id="myModalLabel2">Alert Header</h3>
    </div>
    <div class="modal-body">
      <p>Body goes here...</p>
    </div>
    <div class="modal-footer">
      <button data-dismiss="modal" class="btn green">OK</button>
    </div>
  </div>
</body>
</html>

Click to view the demo





















Home »
  Bootstrap »
    Example »




Accordion
Alert
Auto Complete
Badge
Breadcrum
Button
Carousel
Collapse
Dialog
Dropdown
Form
Icon
Jumbotron
Label
Layout
List
List Group
Media
Navigation Bar
Pager
Page Header
Panel
Paragraph
Pills
Popover
ProgressBar
ScrollSpy
Switch
Tab
Table
Thumnail
Tooltip
Tree
Well