Last active
August 16, 2019 10:04
-
-
Save viveknaskar/74a6f9bf2d120df2606aa043c53298a9 to your computer and use it in GitHub Desktop.
Adding Modal Pop-up on button Submit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Bootstrap Example</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> | |
</head> | |
<body> | |
<div class="container"> | |
<form> | |
<div class="container"> | |
<h1>Employee Management System</h1> | |
<fieldset> | |
<legend>ADD EMPLOYEE</legend> | |
<p>Please fill the form to insert an employee into the database.</p> | |
<hr> | |
<label><b>Name:</b></label> | |
<input type="text" placeholder="Enter Name" name="name" id="name" required> | |
<label><b>Date Of Birth:</b></label> | |
<input type="text" placeholder="YYYY-MM-DD" name="date-of-birth" id="dob" required> | |
<label><b>Gender:</b></label> | |
<input type="radio" name="gender" value="male"> Male | |
<input type="radio" name="gender" value="female"> Female | |
<br> | |
<br> | |
<label><b>Phone:</b></label> | |
<input type="text" placeholder="Enter Phone" name="phone" id="phone"> | |
<label><b>Email:</b></label> | |
<input type="text" placeholder="Enter Email" name="email" id="email" required> | |
<label><b>Address:</b></label> | |
<br> | |
<textarea rows="4" cols="50" placeholder="Enter your address" id="address"></textarea> | |
<br> | |
<hr> | |
<div class="clearfix"> | |
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">ADD Employee</button> | |
</div> | |
</fieldset> | |
</div> | |
<div class="modal fade" id="myModal" role="dialog"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal">×</button> | |
<h4 class="modal-title">Modal Header</h4> | |
</div> | |
<div class="modal-body"> | |
</div> | |
<div class="modal-footer"> | |
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
</form> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment