There is a combobox and if I click to an option, the value going to copied to a textbox. I want to writing these option values one under the other.
This is the javascript code:
$('#subcategory1').on('change', function() {
$('#properties').val($('#properties').val() + '' + $(this).val() + ' ');
})
I tried with ' + keyCode==13', but it's not work. Help me!
This is an example if you want to add the value of the subcategory element to a
textarea
. You can use the newline character\n
instead of the HTML element<br>
HTML: