我有7个文本框。如果前1个文本框(Volume All Years Years)文本发生更改,则需要在接下来的6个输入框中更新文本(最新的2009年最近2014年的卷数量)。我需要JavaScript或Jquery。我将为前1个文本框编写Js textchanged()或focuschange()。所以,我应该写在focuschage()或框TextChanged方法()当文本更改输入框自动更新下6个文本框
<tr id="row12_136" class="RegText">
<td style="width:420px;Padding-right:20px;">Volume All Years</td>
<td style="width:420px;Padding-left:0px;">
<input name="12_136" type="text" maxlength="255" id="12_136" tabindex="61" title="Volume All Years" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" />
</td>
</tr><tr id="row12_60" class="RegText">
<td style="width:420px;Padding-right:20px;">Latest 2009 Volume*</td>
<td style="width:420px;Padding-left:0px;">
<input name="12_60" type="text" maxlength="255" id="12_60" tabindex="62" title="Latest 2009 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" />
<span controltovalidate="12_60" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl47" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span>
</td>
</tr><tr id="row12_61" class="RegText">
<td style="width:420px;Padding-right:20px;">Latest 2010 Volume*</td>
<td style="width:420px;Padding-left:0px;">
<input name="12_61" type="text" maxlength="255" id="12_61" tabindex="63" title="Latest 2010 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" />
<span controltovalidate="12_61" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl48" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span>
</td>
</tr><tr id="row12_62" class="RegText">
<td style="width:420px;Padding-right:20px;">Latest 2011 Volume*</td>
<td style="width:420px;Padding-left:0px;">
<input name="12_62" type="text" maxlength="255" id="12_62" tabindex="64" title="Latest 2011 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" />
<span controltovalidate="12_62" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl49" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span>
</td>
</tr><tr id="row12_63" class="RegText">
<td style="width:420px;Padding-right:20px;">Latest 2012 Volume*</td>
<td style="width:420px;Padding-left:0px;">
<input name="12_63" type="text" maxlength="255" id="12_63" tabindex="65" title="Latest 2012 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" />
<span controltovalidate="12_63" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl50" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span>
</td>
</tr><tr id="row12_64" class="RegText">
<td style="width:420px;Padding-right:20px;">Latest 2013 Volume*</td>
<td style="width:420px;Padding-left:0px;">
<input name="12_64" type="text" maxlength="255" id="12_64" tabindex="66" title="Latest 2013 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" />
<span controltovalidate="12_64" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl51" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span>
</td>
</tr><tr id="row12_65" class="RegText">
<td style="width:420px;Padding-right:20px;">Latest 2014 Volume*</td>
<td style="width:420px;Padding-left:0px;">
<input name="12_65" type="text" maxlength="255" id="12_65" tabindex="67" title="Latest 2014 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" />
<span controltovalidate="12_65" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl52" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span>
</td>
你将如何改变它们,这意味着应该在其中放入什么数据?如果数据在后端检索或计算,则涉及更多工作。 – 2010-05-12 02:00:20
我只是想从textbox1复制文本到textbox2 ... textbox7。只需复制数据。 – James123 2010-05-12 02:08:05