在这篇文章中,我将说明如何使用所有gridview dropdownlist
来填充Gridview Radiobuttonlist
时填充jQuery.First
,这是我的表单内容,其中包含一个dropdown
列表,一种用于MTBC和SSBC。列表具有唯一的ID,以便能够在jQuery
中引用它们。这里的目的是在单选按钮列表的选择中显示一个记录列表。
<script>
$(document).ready(function () {
$(document).ready(function () {
$("input[name$='rdbMtbc']:radio").click(function () {
var radioValue = $(this).val();
if (radioValue == "MTBC(in Days)") {
var options = '';
var serviceArray = new Array("--Select--","1","2","3","4","5","6","7");
for (var i = 0; i < serviceArray.length; i++) {
options += '<option value="' + serviceArray[i] + '">' + serviceArray[i] + '</option>';
}
$('.services_list').html(options);
}
else {
var options = '';
var serviceArray = new Array("--Select--", "1", "2", "3", "4", "5", "6", "7","8","9","10");
for (var i = 0; i < serviceArray.length; i++) {
options += '<option value="' + serviceArray[i] + '">' + serviceArray[i] + '</option>';
}
$('.services_list').html(options);
}
});
});
$("#btnSubmit").click(function () {
});
});
</script>
</div>
</form>