Javascript examples for String Operation:String HTML
Save HTML block in a string variable
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*w ww . j a v a2 s .co m*/ var anotherListItem = "<div class= 'form-list'>"+ "<button class= 'done'></button>"+ "<input type= 'text'>"+ "</div>" console.log(anotherListItem); } </script> </head> <body> </body> </html>