javascript - Get textarea value from textarea object -
why doesn't work?. here input type text:
var name = $("input[name='event[name]']").serializearray(); name = name[0].value; var description = $("input[name='event[description]']").serializearray(); description = description[0].value; when want textarea instead, doesn't work.
this should work:
var name = $("input[name='event[name]']").val(); var description = $("input[name='event[description]']").val(); let jquery handle value.
the .val() method used values of form elements such input, select , textarea.
Comments
Post a Comment