ec table 默认一次显示10行,当我想换成50行的时候,报javascript的错误:
Line: 209
Error: Unable to get value of the property 'ec_crd': object is null or undefined
看了下由10行换成50行的onchange事件:
<select name="ec_rd"  onchange="javascript:document.forms.myTable.ec_crd.value=this.options[this.selectedIndex].value;document.forms.myTable.ec_p.value='1';docum
发现:似乎是 document.forms.myTable.ec_crd.value 找到 ec_crd.这个变量
查了页面源文件,却发现有 ec_crd 这个 element:
<input type="hidden"  name="ec_i"  value="ec" />
<input type="hidden"  name="ec_crd"  value="10" />
<input type="hidden"  name="ec_f_a" />
<input type="hidden"  name="ec_p"  value="1" />
并且,我点其他所有按钮,都不行,因为这些ec_p...都找不到
这是我的JSP:    <body>  
    <div id="man_zone">   
        <form action="tomasInstitue/login" id="searchCarForm">  
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="PageContentoutline">  
                <tr valign="top" class="PageColHighlight">  
                    <td height="19" align="left" valign="middle" >Car Name</td>  
                    <td height="19" align="left" valign="middle" colspan="1">  
                        <input type="text" name="address">  
                    </td>  
                    <td height="19" valign="middle" align="left" >Car Master</td>  
                    <td height="19" align="left" valign="middle" >  
                        <input type="text" name="contact">  
                    </td>  
                </tr>  
            </table>        
        <ec:table   
           items="arlSearchCars"   
           var="searchCarList"   
           action="${pageContext.request.contextPath}/tomasInstitue/carAction!searchCar.action"   
           imagePath="${pageContext.request.contextPath}/images/table/compact/*.gif"   
           rowsDisplayed="10"   
           locale="us_EN"   
           filterable="true"   
           sortable="true"   
           form="myTable">  
          <ec:row>  
            <ec:column property="carNumber" title="Car Number" width="18%"/>  
      
            <ec:column property="carName" title="Car Name" width="25%">  
            </ec:column>  
            <ec:column property="color" title="Color" width="18%"/>  
            <ec:column property="carMasterName" title="Car Master" width="10%"/>  
          </ec:row>  
        </ec:table>  
        <table><tr><td>test</td></tr></table>  
        </form>  
     </div>    
    </body>  环境是IE9
请知道的朋友帮忙分析分析,十分感谢!