JavaScript User name Validation code

Source: Internet
Author: User


<script language= "JavaScript" >
<!--
function Checkdata ()
{
if (! Checkisnull (Form1.oldpass, "Please enter your old password!") ")) return false;
if (! Checkisnull (Form1.newpass, "Please enter a new password!") ")) return false;
if (! Checkisnull (form1.confirm, "Please enter the confirmation password!") ")) return false;
if (Form1.newpass.value!=form1.confirm.value)
{
Alert ("New password and confirmation password are not the same!") ");
Form1.newpass.focus ()
return false;
}
}
-->
</SCRIPT>
<body bgcolor= "#e6f2ff" text= "#000000" leftmargin= "topmargin=" >
<br>
<br>
<br>
<table width= "458" border= "0" cellpadding= "0" cellspacing= "0" align= "center" class= "Kuan" >
<tr>
&LT;TD align= "left" valign= "Top" bgcolor= "#FFFFFF" >
<table width= "100%" border= "0" cellpadding= "0" cellspacing= "2" >
<tr>
&LT;TD background= "Images/system1.gif" height= "align=" "Center" ><font color= "#FF6633" class= "Font" ><b ><font color= "#FF9B59" > Please enter
&quot;<font color= "#FFFFFF" > Old password </font>&quot; and &quot;<font color= "#FFFFFF" > New password </font>&quot;
To modify the password </font></b></font></td>
</tr>
<tr>
&LT;TD bgcolor= "#FFFFFF" class= "Linkfont" align= "center" valign= "Middle" >
<form name= "Form1" method= "Post" action= "admin/savepass.asp" onsubmit= "return Checkdata ()" >
<br>
<table width= "257" border= "0" cellpadding= "0" cellspacing= "0" >
<tr>
&LT;TD width= "33%" class= "Font" align= "right" valign= "middle" height= "a" > Old password:</td>
&LT;TD width= "67%" align= "left" valign= "middle" height= ">"
<input type= "Password" name= "Oldpass" "size=" class= "TextInput" >
</td>
</tr>
<tr>
&LT;TD width= "33%" class= "Font" align= "right" valign= "middle" height= "a" > New password:</td>
&LT;TD width= "67%" align= "left" valign= "middle" height= ">"
<input type= "Password" name= "Newpass" "size=" class= "TextInput" >
</td>
</tr>
<tr>
&LT;TD width= "33%" class= "Font" align= "right" valign= "middle" > Confirm password:</td>
&LT;TD width= "67%" align= "left" valign= "Middle" >
<input type= "Password" name= "confirm" "size=" class= "TextInput" >
</td>
</tr>
&LT;TR align= "center" valign= "Middle" >
&LT;TD colspan= "2" height= "> <br>"
<input type= "Submit" name= "Submit" value= "Modify" class= "Textbotton" >
<input type= "reset" name= "Submit2" value= "reset" class= "Textbotton" >
</td>
</tr>
</table>
</form>

</td>
</tr>
</table>
</td>
</tr>
</table>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.