Skip to content Skip to sidebar Skip to footer

How Do I Extract Dom Object From Within Textarea?

I want to extract out an DOM object out of one of textarea which is defined. Example :

Solution 1:

You can do:

$($("#myTextArea").val());

Solution 2:

Something like this:

var$obj = $( $( 'selector for your textarea' ).val () );
var$yourSpan = $obj.find ( '#sp1' );

First you create a DOM object from whatever string there is in the textarea, then you search this new DOM object (jQuery object actually) for your desired element.

Post a Comment for "How Do I Extract Dom Object From Within Textarea?"