Tuesday, October 8, 2013

Convert jQuery object to DOM object

jQuery Object
$('textarea')
example of setting a value
$('textarea').val("Hi");
DOM object
$('textarea').get(0)
example of setting a value
$('textarea').get(0).value = "Hi";

No comments:

Post a Comment