using javascript with help of jquery
        Posted  
        
            by tazim
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by tazim
        
        
        
        Published on 2010-06-11T06:21:42Z
        Indexed on 
            2010/06/11
            6:32 UTC
        
        
        Read the original article
        Hit count: 250
        
Code written by me based on previous suggestions as follows .
Any help to efficinetly use jquery in order to make this code work . Thanks in advance
$(document).ready(function()  
     {
              self.setInterval("clock()",1000);  
              $("button").click(function()  
              {  
                     clock;  
              });  
              function clock()  
              {
                   clock();  
                   time=new Date();  
                   var s = "<p>" + time + "</p>";  
                   $(s).appendTo("div");  
              }  
     });  
<button > Click Me button  </div>
<div id="someid"></div>
© Stack Overflow or respective owner