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

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -