One for all,all for one.
2014年6月25日 星期三
dynamic generate select options
$.each(citys, function(index, value) {
var option = $('
');
option.attr({ 'value': index }).text(value);
$('[name=city]').append(option)
});
References :
javascript - JQuery create new select option - Stack Overflow
沒有留言:
張貼留言
‹
›
首頁
查看網路版
沒有留言:
張貼留言