I have snippet of HTML in a string like this:
var htmlString = '<input type="text" id="someID" name="someID">';
How do I, with jQuery, set its value so that the HTML ends up like this:
'<input type="text" id="someID" name="someID" value="newValue">';
Thanks,
Scott
But this will return jQuery object, not string. You can add it to DOM.
EDIT :
You can use @idor_brad’s method. That is the best way or
or