您好,我有一个选择菜单,选择完成后我需要更新 3 个文本框,并且应该加载一个默认值 1,如下所示。
<select name="select" id="select">
<option value="1">selection 1</option>
<option value="2">selection 2</option>
<option value="3">selection 3</option>
</select>
<input type="text" name="txt1" id="txt1" value="1"/>
<input type="text" name="txt2" id="txt2" value="2"/>
<input type="text" name="txt3" id="txt3" value="3"/>
// if selection 1 is selected text box's values should come as follows, (Default)
id="txt1" value="1" >> id="txt2" value="2" >> id="txt3" value="3"
// if selection 2 is selected text box's values should come as follows,
id="txt1" value="4" >> id="txt2" value="5" >> id="txt3" value="6"
// if selection 3 is selected text box's values should come as follows,
id="txt1" value="7" >> id="txt2" value="8" >> id="txt3" value="9"
任何 JavaScript 帮助?非常感谢!!!