form validation (client side) using jquery

This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 36
Joined: Thu Jun 28, 2012 2:11 pm

form validation (client side) using jquery

Postby phpkiller » Mon May 19, 2014 11:48 pm

Here is the code:

<title>login page validation using jQuery</title>

<script type="text/javascript" src="">
<!-- This is suggested that you must use the latest jQuery code here -->
<script type="text/javascript">
var username=$('#email').val();
var password=$('#password').val();

$('#msg').slideDown().html("<span>Please type Username</span>");
return false;
$('#msg').slideDown().html('<span id="error">Please type Password</span>');
return false;

<fieldset style="width:250px;">
<form method="post" action="index.php">
Log-in page validation (client side) using jQuery

<div id="dis"></div><br>
Username: <input type="text" name="email" id="email" /><br />
Password: <input type="password" name="password" id="password" /><br /><br />
<center><input type="submit" name="submit" id="submit" /></center>


Return to “Your Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests