【发布时间】:2010-09-09 01:49:18
【问题描述】:
使用jQuery,如何动态设置选择框的大小属性?
我想将它包含在这段代码中:
$("#mySelect").bind("click",
function() {
$("#myOtherSelect").children().remove();
var options = '' ;
for (var i = 0; i < myArray[this.value].length; i++) {
options += '<option value="' + myArray[this.value][i] + '">' + myArray[this.value][i] + '</option>';
}
$("#myOtherSelect").html(options).attr [... use myArray[this.value].length here ...];
});
});
【问题讨论】:
标签: jquery