标签:
实现能间个控制,也可统一控制,
父select:
<select class="form-controlText" style="width: 60px" id="scoresame">
<option value="5">5</option>
<option value="4">4</option>
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
</select>
子select:
<select class="form-controlText" data-bind="value:ExamResult" name="selsectItem">
<option value="5">5</option>
<option value="4">4</option>
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
</select>
Jquery:
$("#scoresame").change(function () {
var value = $(this).val();
$("select[name=‘selsectItem‘]").each(function () {
$(this).val(value);
});
//获取修改的vlue
$.each(teacherToStuModule.DetailValues(), function (index, content) {
teacherToStuModule.DetailValues()[index].ExamResult(value);
});
});
标签:
原文地址:http://www.cnblogs.com/shy1766IT/p/4884341.html