Javascript examples for jQuery:String
JQuery find() on object created from a string
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.2.js"></script> <script type="text/javascript"> $(function(){//from w w w .java 2s .co m var html= '<select name="id"></select>'; var $select = $('<div></div>').append(html); $select.find('select').append('<option value="1">Test</option>'); console.log($select.html()); }); </script> </head> <body> </body> </html>