form validation (client side) using jquery

This is where you share YOUR scripts with others

Moderators: egami, macek, gesf

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

Mon May 19, 2014 11:48 pm

Here is the code:

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

<script type="text/javascript" src=" ... ery.min.js">
<!-- 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>


Post Reply