【发布时间】:2010-07-17 18:15:20
【问题描述】:
我正在尝试更改仅当前字段之后的下一个选择框的值。
表单是一长串具有相同类的字段的行。在“第 1 行”中的“数量”字段的焦点上,我想将“类型”选择框更改为同一行中的“框”。我尝试的所有代码都使整个页面上的所有“类型”选择框都发生了变化。我只希望最直接的,最接近数量字段的更改。
UOM 字段是我在用户关注数量时尝试更改的字段。
谢谢!
<tr class="draggable odd">
<td class="content-multigroup-cell-field-part-num">
<div id="edit-group-order-0-field-part-num-value-wrapper" class="form-item">
<label for="edit-group-order-0-field-part-num-value">J&B No.:
</label>
<input type="text" class="form-text text idleField" value="" size="10" id="edit-group-order-0-field-part-num-value" name="group_order[0][field_part_num][value]" pattern="[0-9]*">
</div>
</td>
<td class="content-multigroup-cell-field-quantity">
<div id="edit-group-order-0-field-quantity-value-wrapper" class="form-item">
<label for="edit-group-order-0-field-quantity-value">Quantity:
</label>
<input type="text" class="form-text text idleField" value="" size="5" id="edit-group-order-0-field-quantity-value" name="group_order[0][field_quantity][value]" pattern="[0-9]*">
</div>
</td>
<td class="content-multigroup-cell-field-quantity-type">
<div id="edit-group-order-0-field-quantity-type-value-wrapper" class="form-item">
<label for="edit-group-order-0-field-quantity-type-value">UOM:
</label>
<select id="edit-group-order-0-field-quantity-type-value" class="form-select" name="group_order[0][field_quantity_type][value]">
<option selected="selected" value="">- None -
</option>
<option value="Box(es)">Box(es)
</option>
<option value="Case(s)">Case(s)
</option>
<option value="Each">Each
</option>
<option value="Feet">Feet
</option>
</select>
</div>
</td>
健保编号: 数量: 计量单位: - 没有任何 - 盒子 案例 每个 脚
【问题讨论】:
-
你能发布你正在使用的当前代码/标记吗?
-
查看实际的 html 以查看 DOM 层次结构会有所帮助。
-
我已经用代码更新了原始帖子。很抱歉!