Это мой код
$('#enterTags').keydown(function(event) {
var tag = $(this).val();
// 188 is comma, 13 is enter
if (event.which === 188 || event.which === 13) {
if (tag) {
$('#tags').append('<div>' + tag + '</div>');
**$('#falseInput').val(tag + ', ');**
$(this).val('');
}
event.preventDefault();
}
// 8 is backspace
else if (event.which == 8) {
if (!tag) {
$('#tags div:last').remove();
event.preventDefault();
}
}
});
В разделе кода, который я выделил, возникли проблемы. Мне нужно, чтобы значение #enterTags было добавлено к значению #falseInput, а не перезаписывало его. Как я могу это сделать?