日期:2014-05-18  浏览次数:20881 次

logic:iterate 的一个小问题
请问我如何在dodetail脚本函数中获得 <logic:iterate> 中的indexId= "i "值

<logic:iterate   name= "thisForm "   property= "PJ3G2120_YoukenList "   id= "record "   indexId= "i ">
      <td>
      <html:link   href= "javascript:doDetail(); ">
        <html:img   page= "/images/keiyaku/btm_5SRef.gif "   width= "49 "   border= "0 "   />
      </html:link>
</td>
</logic:iterate>

function   doDetail()   {
                //参照 表示内容   ボタン押下
var   theform   =   document.forms[0];
var   myObject   =   new   Object();
var   result   =   window.showModalDialog( "/do/PJ3G2120Link?refertype= <%=此处如何获得 <logic:iterate> 中i的值%> ",   myObject, "dialogWidth:1000px;dialogHeight:600px ");
if(result   !=null   &&   result   !=   " "){
theform.teishutsuBasho.value   =   result;
}
          }

------解决方案--------------------
作为doDetail方法的一个参数传入啊,
请结贴给分吧,谢谢。

------解决方案--------------------
<logic:iterate name= "thisForm " property= "PJ3G2120_YoukenList " id= "record " indexId= "i ">
<td>
<html:link href= "javascript:doDetail( <bean:write name= "i "/> ); ">
<html:img page= "/images/keiyaku/btm_5SRef.gif " width= "49 " border= "0 " />
</html:link>
</td>
</logic:iterate>
function doDetail(var i) {
//参照 表示内容 ボタン押下
var theform = document.forms[0];
var myObject = new Object();
var result = window.showModalDialog( "/do/PJ3G2120Link?refertype= "+i, myObject, "dialogWidth:1000px;dialogHeight:600px ");
if(result !=null && result != " "){
theform.teishutsuBasho.value = result;
}
}