ItSolutionStuff.com

How to Add Dialog Box in Bootstrap?

By Hardik Savani • November 5, 2023
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

Hardik Savani

I'm a full-stack developer, entrepreneur, and founder of ItSolutionStuff.com. Passionate about PHP, Laravel, JavaScript, and helping developers grow.

📺 Subscribe on YouTube

We Are Recommending You

How to Add Bootstrap 5 in Angular 15?

Read Now →

How to Install Bootstrap 5 in Angular 14?

Read Now →

Angular 13 Bootstrap Datepicker Example

Read Now →

React Bootstrap Popovers Example

Read Now →

React Bootstrap Modal Popup Example

Read Now →

Bootstrap Star Rating using Bootstrap-star-rating JS Example

Read Now →

PHP MySQL Contact US Form with Validation Example

Read Now →

Bootstrap Dynamic Autocomplete search using Typeahead JS

Read Now →

Bootstrap Datepicker Change Date Format Example

Read Now →

Bootstrap Colorpicker Example Code

Read Now →

Bootstrap Timepicker using Datetimepicker JS Example

Read Now →

JQuery Delete Confirm Modal using Bootbox Example

Read Now →

How to Use Collapse Example in Bootstrap?

Read Now →

How to Add Tooltip in Bootstrap?

Read Now →

How to use Datepicker in Bootstrap?

Read Now →