<form onsubmit="return check()">
<input type="submit" name="Submit" value="确定" class="textarea2">

解决方案 »

  1.   

    function check()
    {
    if (document.qiye_register_form.password.value.length == " ")
    {
    alert ("请输入你的密码!");
    document.qiye_register_form.password.focus();
    return false;
    }
    if (document.qiye_register_form.repassword.value.length == " ")
    {
    alert ("请输入你的验证密码!");
    document.qiye_register_form.repassword.focus();
    return false;
    }
    </script>
    注意值为"",即NULL而非0;
    <form name=qiye_register_form action="Your URL" onSubmit="return check()">
    ....
    <input type="submit" value="确定" >
    即可。