Insert date into any HTML element - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:html

Description

Insert date into any HTML element

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//  w  ww  .  jav a2s .  co m
$(document).ready(function(){
      var myDate = new Date();
      $(document.createTextNode(myDate)).appendTo("#calcShptable");
});
    });

      </script> 
   </head> 
   <body> 
      <div id="calcShptable"></div>  
   </body>
</html>

Related Tutorials