问题急于解决,有答必有分!

yicn 2004-11-02 03:40:40
正在做一个项目,技术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>




本人八千多分,如果解决,另开贴送两千分.给分只是刺激一下.
...全文
61 点赞 收藏 7
写回复
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
alaal 2004-11-02
to fxjtoday(fxjtoday
左边有版块划分的树,进进入你要去的版块中的最底层就可以在右上角看到提问按钮了

比如现在所在版块是Java JSP/Servlet/JavaBean
回复
liangm 2004-11-02
ding
回复
fxjtoday 2004-11-02
好久不来了,请问怎么在版里提问啊
“提问请到小类社区”什么意思啊
回复
alaal 2004-11-02
^_^

楼上剖析的精辟
回复
wangnewton 2004-11-02
nod

javascript
回复
yaray 2004-11-02
纯粹的JavaScript问题
回复
rosen 2004-11-02
没用过STRUTS
帮你UPUP
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告