jquery DropDownList

不用任何插件

var myOptions = {
val1 : 'text1',
val2 : 'text2'
};
$.each(myOptions, function(val, text) {
$('#mySelect').append(
$('<option></option>').val(val).html(text)
);
});



posted on 2012-01-11 14:58  tianyaxiang  阅读(179)  评论(0编辑  收藏  举报

导航