$(window).load(
Create the error div in modal body. and set error
$(document).ready(function(){ $('#alertbox').click(function(){ $("#error").html("You Clicked on Click here Button"); $('#myModal').modal("show"); }); });
Bootstrap Example Modal Example Click here × Modal Header