The following code shows how to click to open model dialog.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.8.3.js'></script>
<script type='text/javascript'
src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.1/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.1/css/bootstrap.min.css">
</head><!-- w w w .j a v a 2s . c o m-->
<body>
<div id="registration_modal" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Register An Account</h3>
</div>
<div class="modal-body">Registration form goes here.</div>
<div class="modal-footer">
<button class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button class="btn btn-primary">Register</button>
</div>
</div>
<div class="navbar navbar-fixed-top">
<a href="#registration_modal" data-toggle="modal"> Register </a>
</div>
</body>
</html>