我有一个a.jsp
里面包含两个iframe<table height="100%" cellSpacing="0" cellPadding="0" width="100%">
<tbody>
<tr height="50%" bgcolor="#B4D19E">
<td id="masterTD" vAlign="center" noWrap align="middle" name="frmMenu">
<iframe id="master" style="Z-INDEX: 1; VISIBILITY: inherit; WIDTH: 100%; HEIGHT: 100%"
name="BoardTitle" frameBorder="0" src="../check/checkManager.do?method=queryMaster&masterList="+"<c:out value='${masterList}' />" >
</iframe>
</td>
</tr>
<tr height="45%" bgcolor="#B4D19E">
<td id="detailTD" vAlign="center" noWrap align="middle" name="frmMenu">
<iframe id="detail" style="Z-INDEX: 2; VISIBILITY: inherit; WIDTH: 100%; HEIGHT: 100%"
name="BoardTitle" frameBorder="0" src="../check/checkManager.do?method=queryDetail"+"<c:out value='${detailList}' />" >
</iframe>
</td>
</tr>
<tbody>
</table>在queryDetail和queryMaster的Action里面是这样写的
List list = (List)request.getAttribute("masterList");List list = (List)request.getAttribute("detailList");
但是为什么list会为null呢?我直接在包含iframe的jsp里面执行<c:out value='${detailList}' />是有值的,搞不懂!!
请高手指点!!!!

解决方案 »

  1.   

    又比如说我有a.html
    <table height="100%" cellSpacing="0" cellPadding="0" width="100%">
    <tbody>
    <tr height="45%" bgcolor="#B4D19E">
    <td id="masterTD" vAlign="center" noWrap align="middle" name="frmMenu">
    <iframe id="master" name="master" style="Z-INDEX: 1; VISIBILITY: inherit; WIDTH: 100%; HEIGHT: 100%"
    name="BoardTitle" frameBorder="0" src="b.html" >
    </iframe>
    </td>
    </tr>
    </tbody>
    </table>
    和b.html
    <table id="mastertable" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" align="center">
    <tr onClick="trSelected(this)" onDblClick="trShow(this)" >
    <td width="5%" align="center"><xmxt:out value='${count}'/></td>
    <td width="9%" align="center"><xmxt:out value='${data.iso_cd}'/></td>
    <td width="15%" align="center"><xmxt:out value='${data.vou_no}'/></td>
    <td width="9%" align="center"><xmxt:out value='${data.add_dt}'/></td>
    <td width="10%" align="center"><xmxt:out value='${data.maker_nm}'/></td>
    <td width="10%" align="center"><xmxt:out value='${data.dept_nm}'/></td>
    <td width="10%" align="center"><xmxt:out value='${data.oper_nm}'/></td>
    <td width="9%" align="center">
    <xmxt:if test="${data.chg_dt==null}">&nbsp;</xmxt:if>
    </td>
    <td width="9%" align="center">
    <xmxt:if test="${data.audit_dt==null}">&nbsp;</xmxt:if>
    </td>
    <td width="10%" align="center">
    <xmxt:if test="${data.audit_==0}">???</xmxt:if>
    <xmxt:if test="${data.audit_==1}">????</xmxt:if>
    <xmxt:if test="${data.audit_==2}">??</xmxt:if>
    <xmxt:if test="${data.audit_==3}">????</xmxt:if>
    <xmxt:if test="${data.audit_==9}">???</xmxt:if>
    </td>
    <td width="13%" align="center"><xmxt:out value='${data.rem}'/></td>
    <td style="display:none" width="5%" align="center">
    <input type="hidden" name="id_key" size="5" value="<xmxt:out value='${data.id_key}'/>" />
    </td>
    </tr>
    </table>
    请问在a.html里面trSelected(this)和trShow(this)的javascript应该如何写才能获得table的rows.length,
    我这样写
    for(var i=0;i<rows;i++){
    master.getElementsByName('id_key')[i].parentNode.parentNode.style.backgroundColor="#FFFFFF";
    }为什么不对!
      

  2.   

    从页面上能传List对象到后台吗?好像传不了吧。
      

  3.   

    假设table的id=“tab”,用document.all("tab").rows.length可以获得行数