传值哪何解决,高手们儿进来~~~~~~~~~~~```
yicn 2004-11-02 03:37:10 正在做一个项目,技术STRUTS
客户要实现在一个功能,在TEXT框中输入数据后,onchange的时候,要把这个框里的值进行计算后传到别一个TEXT框中.目前能实现到,值传到另一个框中,但是这个框非STRUTS控建(HTML标签),所以FORM中的GET,与SET不好用.如何解决这个问题?
<% int i = 1; %>
<logic:iterate id="resultList" name="SyokudoTanaorosiInpForm" property="listSyokudouTanaorosi" indexId="index" type="jp.co.aps.easy21.job.shibu.syokudou.input.bean.SyokudoTanaorosiInpBean">
<% if(i % 2 == 0) { %>
<TR class="tow">
<% } else { %>
<TR>
<% } %>
<TD class="l nmb" nowrap style="width:22px;"><%= i %></TD>
<TD nowrap style="width:193px;"><bean:write name="SyokudoTanaorosiInpForm" property="<%= "listSyokudouTanaorosi[" + index + "].genzairyoName" %>" /></TD>
<TD class="cp" nowrap style="width:49px;"><bean:write name="SyokudoTanaorosiInpForm" property="<%= "listSyokudouTanaorosi[" + index + "].syohizeiSyurui" %>" /></TD>
<TD class="nmb" nowrap style="width:65px;"><bean:write name="SyokudoTanaorosiInpForm" property="<%= "listSyokudouTanaorosi[" + index + "].siireTanka" %>" /></TD>
<TD class="nmb" nowrap style="width:81px;"><bean:write name="SyokudoTanaorosiInpForm" property="<%= "listSyokudouTanaorosi[" + index + "].irisu" %>" /></TD>
<TD class="cp" nowrap style="width:40px;"><bean:write name="SyokudoTanaorosiInpForm" property="<%= "listSyokudouTanaorosi[" + index + "].tani" %>" /></TD>
<TD class="nmb">
<html:text styleClass="nmb Offime" name="SyokudoTanaorosiInpForm" property="<%= "listSyokudouTanaorosi[" + index + "].tanaorosiSu" %>" readonly="<%= textFlag %>" style="width:97px;"
onfocus="_beforeFocus = this; if (isNotInput(this.value)) this.value = ''; this.select();"
onchange="<%= "if (isNotInput(this.value)) this.value = ''; this.select(); keisan" + index + "(this.value);" %>"/></TD>
<TD class="r nmb">
<INPUT class="nmb" name="<%= "kingaku" + index %>" readonly="<%= textFlag %>"
type="text" value="<bean:write name="SyokudoTanaorosiInpForm" property="<%= "listSyokudouTanaorosi[" + index + "].tanaorosiGaku" %>"/>" style="width:180px;"
onfocus="_beforeFocus = this; if (isNotInput(this.value)) this.value = ''; this.select();"></TD>
<SCRIPT language="JavaScript1.2" type="text/javascript">
<!--
function keisan<%= index %>(val)
{
document.SyokudoTanaorosiInpForm.<%= "kingaku" + index %>.value = val;
}
//-->
</SCRIPT>
<% i++; %>
</logic:iterate>
本人八千多分,如果解决,另开贴送两千分.给分只是刺激一下.