, . , - , , fcbkcomplete, .
$(document).ready(function() {
$("#select3").fcbkcomplete({
addontab: true,
maxitems: 10,
input_min_size: 0,
height: 10,
select_all_text: "select",
onselect: clicker
});
});
var clicker = function() {
var selected = new Array();
$('option', this).each(function() {
selected.push($(this).val());
});
$('#interest').val(selected.join(', '));
};
.
. <option>'s select, fcbkcomplete, . , , .
, fcbkcomplete, -, id <option>'s - opt_vaQDzJU37ArScs818rc8HUwz9gm1wypP, . , , .
, :
$('option', this).each(function() {
for (var i = 0; i < this.attributes.length; i++) {
var pair = this.attributes[i].name + ': '
+ this.attributes[i].value;
alert(pair);
}
selected.push($(this).val());
});
, fcbkcomplete.
JSON txt , , , . , , JSON <option> s. :
$(document).ready(function() {
var clicker = function(e) {
var selected = new Array();
$('option', $('#select3')).each(function() {
selected.push(this.value);
});
$('#interest').val(selected.join(', '));
};
$("#select3").fcbkcomplete({
json_url: "parseJSON.txt",
addontab: true,
maxitems: 10,
input_min_size: 0,
height: 10,
select_all_text: "select",
onselect: clicker
});
});