function verifysubmit2()
{
if(document.form22.minRate_1.value =="");
{
alert("请输入起始比率值!");
document.form10.minRate_1.focus();
document.form10.minRate_1.select();//这里是form10还是form22??

解决方案 »

  1.   

    改成这样了,还是不行了,一样的毛病啊.
    function verifysubmit1()
    {
    if(document.form10.minRate.value =="");
    {
    alert("请输入起始比率值!");
    document.form10.minRate.focus();
    document.form10.minRate.select();
    return false;
    }
    if(document.form10.maxRate.value =="");
    {
    alert("请输入结束比率值!");
    document.form10.maxRate.focus();
    document.form10.maxRate.select();
    return false;
    }
    return true;

    }
    function verifysubmit2()
    {
    if(document.form22.minRate_1.value =="");
    {
    alert("请输入起始比率值!");
    document.form22.minRate_1.focus();
    document.form22.minRate_1.select();
    return false;
    }
    if(document.form22.maxRate_1.value =="");
    {
    alert("请输入结束比率值!");
    document.form22.maxRate_1.focus();
    document.form22.maxRate_1.select();
    return false;
    }
    return true;

    }
    <form action="./competition/queryByRate1.jsp" name="form10" onSubmit="return verifysubmit1();">
           <td width="323" height="24" align="left" valign="middle">&nbsp;瑞立比率: &nbsp;&nbsp; 从 
             <input type="text" name="minRate" class="input" size="13"  onChange="VerifyIntandFloat(this)">&nbsp;到 
             <input type="text" name="maxRate" class="input" size="13" onChange="VerifyIntandFloat(this)"></td>
           <td width="45" align="center"><input type="submit" class="input" name="Submit8" value="查询"></td></form><form action="./competition/queryByRate2.jsp" name="form22" onSubmit="return verifysubmit2();">
           <td width="323" height="24" align="left" valign="middle">&nbsp;对手比率: &nbsp;&nbsp; 从
             <input  type="text" name="minRate_1" class="input" size="13" onChange="VerifyIntandFloat(this)">&nbsp;到
             <input type="text" name="maxRate_1" class="input" size="13" onChange="VerifyIntandFloat(this)"></td>
           <td width="45" align="center"><input type="submit" class="input" name="Submit22" value="查询"></td></form> 当我在文本框里输入值时,提交它还是要提示 请输入比率,这是为什么啊