Javascript examples for DOM:Element outerHTML
get html of element itself using HTML5 and HTML4
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/* www .j a v a 2 s.c om*/ console.log(scheduledDate.outerHTML);//HTML5 //HTML4.01 -(FF). console.log(document.getElementById("scheduledDate").outerHTML); } </script> </head> <body> <div id="content"> content div </div> <input type="text" id="scheduledDate" class="datetime"> </body> </html>