How to Add Dialog Box in Bootstrap?
We always need to dialog box in our project because modal is very interesting and specially for GUI. Always we like to use modal for creating data or editing data and also for conformation. So if you think how to set modal in my project then it is very easy you have to just copy bellow example and run in your local you will find result. In this example i provide bootstrap modal example with code so it pretty simple to use.
Example:
<html lang="en">
<head>
<title>Bootstrap modal popup example</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
<a href="#myDemoModal" role="button" class="btn btn-large btn-success" data-toggle="modal">Promote Demo Modal</a>
<!-- Modal HTML -->
<div id="myDemoModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">I am from Itsolutionstuff.com</h4>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-success">I Read</button>
</div>
</div>
</div>
</div>
<!-- Modal HTML End -->
</body>
</html>
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Add Bootstrap 5 in Angular 15?
- How to Install Bootstrap 5 in Angular 14?
- Angular 13 Bootstrap Datepicker Example
- React Bootstrap Popovers Example
- React Bootstrap Modal Popup Example
- Bootstrap Star Rating using Bootstrap-star-rating JS Example
- PHP MySQL Contact US Form with Validation Example
- Bootstrap Dynamic Autocomplete search using Typeahead JS
- Bootstrap Datepicker Change Date Format Example
- Bootstrap Colorpicker Example Code
- Bootstrap Timepicker using Datetimepicker JS Example
- JQuery Delete Confirm Modal using Bootbox Example
- How to Use Collapse Example in Bootstrap?
- How to Add Tooltip in Bootstrap?
- How to use Datepicker in Bootstrap?