下载了一个asp.net网站,有一点看不懂,请高手指教!!!
这是一个用户注册信息检测的脚本函数:
function checkform()
{
var f= document.getElementById( "aspnetForm ");
if(trim(f.ctl00_ContentPlaceHolder1_textboxusername.value)== " ")
{
alert ( "请输入用户名 ");
f.ctl00_ContentPlaceHolder1_textboxusername.value= " ";
f.ctl00_ContentPlaceHolder1_textboxusername.focus();
return false;
}
else if(!checkusername(trim(f.ctl00_ContentPlaceHolder1_textboxusername.value)))
{
alert ( "您输入的用户名的格式错误 ");
//f.ctl00_ContentPlaceHolder1_textboxusername.value= " ";
f.ctl00_ContentPlaceHolder1_textboxusername.focus();
return false;
}
if(trim(f.ctl00_ContentPlaceHolder1_TextBoxpassword1.value)== " ")
{
alert ( "密码不能为空!!!!!!!!!!!!! ");
f.ctl00_ContentPlaceHolder1_TextBoxpassword1.focus();
return false;
}
if(f.ctl00_ContentPlaceHolder1_TextBoxpassword1.value!=f.ctl00_ContentPlaceHolder1_TextBoxpassword2.value)
{
alert ( "两次输入密码不一致 ");
f.ctl00_ContentPlaceHolder1_TextBoxpassword1.value= " ";
f.ctl00_ContentPlaceHolder1_TextBoxpassword2.value= " ";
f.ctl00_ContentPlaceHolder1_TextBoxpassword1.focus();
return false;
}
if(trim(f.ctl00_ContentPlaceHolder1_TextBoxemail.value)== " ")
{
alert ( "请输入邮箱地址 ");
f.ctl00_ContentPlaceHolder1_TextBoxemail.value= " ";
f.ctl00_ContentPlaceHolder1_TextBoxemail.focus();
return false;
}
else if(!isemail(trim(f.ctl00_ContentPlaceHolder1_TextBoxemail.value)))
{
alert ( "您输入的邮箱的格式错误 ");
//f.ctl00_ContentPlaceHolder1_textboxusername.value= " ";
&n