黑马程序员技术交流社区

标题: JS的问题 没解决出来,高手帮忙看看。。。 [打印本页]

作者: 何创    时间: 2012-12-31 17:28
标题: JS的问题 没解决出来,高手帮忙看看。。。
本帖最后由 何创 于 2013-1-2 15:40 编辑

<logic:present name="aq2016Entity" property="aq2017Entitys">
              <logic:iterate id="aq2017Entity" name="aq2016Entity" property="aq2017Entitys" indexId="indexId">
               <bean:define id="aq2018Flag" name="aq2017Entity" property="aq2018Flag" type="String"/>
               <table width="100%" class="result"  border="1" align="center" cellpadding="0" cellspacing="0" vspace="0">
                <tr>
                  <td width="20%" align="center" bgcolor="eeeeee"><font color="#333333">根原因名称:</font></td>
                  <td width="80%" height="25" align="left" id="aq2017Entity_gyyid" >
                   <strong><font color="#004499"><bean:write name="aq2017Entity" property="reasonName" filter="false"/></font></strong>
                  </td>
               </tr>
               <% if(aq2018Flag!=null&&aq2018Flag.equals("false")){%>
               <tr>
                  <td align="center" bgcolor="eeeeee"><font color="#333333">事实与分析:</font></td>
                  <td height="25" align="left" class="wrap"><bean:write name="aq2017Entity" property="reason_desc" filter="false"/></td>
               </tr>
               <%}else{%>
               <tr>
                  <td align="center" bgcolor="eeeeee"><font color="#333333">事实与分析:</font></td>
                  <td height="25" align="left" class="wrap"><bean:write name="aq2017Entity" property="reasonOptions" filter="false"/></td>
               </tr>
               <%}%>
               <tr>
                  <td height="5" align="center" bgcolor="#FFFFFF" colspan="2"></td>
               </tr>
               <tr>
               <td colspan="2"></td>
               </tr>
               </table>
               </logic:iterate>
             </logic:present>



==================================================
function addEventInvestigate() {
     //alert(document.forms[0].scene_id.value) ;
var str =document.forms[0].sceneId.value;
var str1=document.getElementById("scene_id_wxysbid").innerText;
// var str3=document.getElementById("aq2017Entity_gyyid").value;
//          var str3=document.getElementById("aq2017Entity_gyyid").innerText;
document.forms[0].operate.value="toAddEventResult";
document.forms[0].submit();
}

怎么在这里取出 根原因名称 的值 也就是bean:write name="aq2017Entity" property="reasonName" filter="false"/></font>里的值 ???
作者: 黄锦成    时间: 2013-1-1 14:14
根据名字来取,取出的是数组,然后取出第0个
作者: 何创    时间: 2013-1-2 15:23
黄锦成 发表于 2013-1-1 14:14
根据名字来取,取出的是数组,然后取出第0个

好像 不太对。。我在试试 谢谢你




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2