"Simple Registration form"
Bootstrap 2.3.2 Snippet by erda19

<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="form-horizontal" action='' method="POST"> <fieldset> <div id="legend"> <legend class="">Register</legend> </div> <div class="control-group"> <!-- Username --> <label class="control-label" for="username">Name</label> <div class="controls"> <input type="text" id="username" name="username" placeholder="" class="input-xlarge"> </div> </div> <div class="control-group"> <!-- Username --> <label class="control-label" for="username">Address</label> <div class="controls"> <input type="text" id="address" name="username" placeholder="" class="input-xlarge"> </div> </div> <div class="control-group"> <!-- E-mail --> <label class="control-label" for="email">E-mail</label> <div class="controls"> <input type="text" id="email" name="email" placeholder="" class="input-xlarge"> </div> </div> <div class="control-group"> <!-- Password--> <label class="control-label" for="password">Password</label> <div class="controls"> <input type="password" id="password" name="password" placeholder="" class="input-xlarge"> </div> </div> <div class="control-group"> <!-- Button --> <div class="controls"> <button class="btn btn-success">Register</button> </div> </div> </fieldset> </div>
$( document ).ready(function() { $( ".btn" ).click(function() { //alert( "Handler for .click() called." ); var username = $('#username').val(); var Address = $('#address').val(); var email = $('#email').val(); var password = $('#password').val(); if(username == "" || Address == "" || email == "" || password == "" ) { return; } else { $('#username').val(''); $('#address').val(''); $('#email').val(''); $('#password').val(''); } }); });

Related: See More


Questions / Comments: