对于任意一个下拉框选择,给件数自动生成一个值没明白
-------------------------
选择pos变灰  用js. 添加 select的事件Onchange=""
事件里判断如果选择的是pos  
另一个下拉框的 option.length=0  or disabled="ture"

解决方案 »

  1.   

    是这个意思 在INPUT中间的VALUE进行判断 如果是首期 在件数的输入框中间直接显示1 并不能修改,如果是补交首期 则显示0  如果是破碎POS 则直接在输入框里面输入件数
      

  2.   

    啊,有点明白了
    onchange="changelocation(document.forms['aa'].elements['bb'].options[document.forms['aa'].elements['bb'].selectedIndex].value)"function changelocation(id)
    {
       if(id=="首期")
         {
           Prem.value="1";
           Prem.readonly="ture";
         }
       if(id=="补交首期")
         {
           Prem.value="0";
           Prem.readonly="ture";
         }
        if(id=="pos")
         {
           Prem.value="";
           Prem.readonly="false";
         }
    }
      

  3.   

    <script>function changelocation(id)
    {
       if(id=="首期")
         {
           Prem.value="1";
           Prem.readonly="ture";
         }
       if(id=="补交首期")
         {
           Prem.value="0";
           Prem.readonly="ture";
         }
        if(id=="pos")
         {
           Prem.value="";
           Prem.readonly="false";
         }
    }</script><td>  <select name="PayKind" onchange="changelocation(this.value);">
      <option  value="首期 ">首期 </option>
      <option  value="补缴首期">补缴首期</option>
      <option  value="POS">POS</option>
    </select></td>
    后接一个
    <td height="41">
    件数
    <input type="text" name="Prem" size="10"  value="">&nbsp;*
    </td>