Javascript examples for jQuery Method and Property:append
get all elements contained by a div with given name
<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"> $(window).load(function(){//from w ww .j a v a2 s . c o m inputs=$('input') for (input in inputs){ $('ul').append('<li>'+input+((!isNaN(input))?'<b><--this is an input-element</b>':'')+'</li>'); } }); </script> </head> <body> <ul></ul> <input> <input> </body> </html>