Launch Bootstrap Modal on page load

Welcome back to, today we will see how to Launch Bootstrap Modal on page load using JavaScript. so in the very first step we will create a index.html file than we will write our JavaScript code which are helps to show our Bootstrap modal on loading of index.html file.

on page load show modal

In the index.html file we will call the bootstrap.min.js and bootstrap.min.css to load bootstrap files in our web page.


Add the below bootstrap maxcdn files in the head section of index.html

Also Read :
PHP Login Script With Remember me.
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

now we write down our JavaScript code to launch bootstrap modal on the loading of index.html web page. so put the below JavaScript code on the body section of the index file.

on the above JavaScript code we called the modal id and change its behavior from fade to show.

just go to the browser and run your index.html file, the bootstrap modal will automatically launch on page load.

Also Read

Check Email is already registered in database with the help PHP, AJAX And JQuery