﻿/////////////////
function $(id){
	return document.getElementById(id);
	}
function rndyzm(){
	return Math.floor(Math.random()*99999+10000);
	}	
window.onload=function(){
	$("button2").value=$("hdcode").value=rndyzm();
	$("button2").onclick=function(){
		this.value=$("hdcode").value=rndyzm();
		};
	}
/////////////////////////////////
function check()
{
    if(form1.count.value=="")
    {
        alert("用户名不能为空！");
        return false;
    }
    if(form1.password.value=="")
    {
        alert("密码不能为空！");
        return false;
    }
    if(form1.textfield.value=="")
    {
        alert("验证码不能为空！");
        return false;
    }
    if(form1.textfield.value!=form1.hdcode.value)
    {
        alert("验证码输入不正确！");
        return false;
    }
    return true;
}
