<html> <head> <script type="text/javascript"> function countup(startingdate, base){ this.currentTime=new Date() this.startingdate=new Date(startingdate) this.base=base this.start() } countup.prototype.oncountup=function(){} countup.prototype.start=function(){ var thisobj=this this.currentTime.setSeconds(this.currentTime.getSeconds()+1) var timediff=(this.currentTime-this.startingdate)/1000 var secondfield=Math.floor((timediff)) var result={seconds:secondfield} this.oncountup(result) setTimeout(function(){thisobj.start()}, 1000) } </script> </head> <body> <div id="holder"> </div> <script type="text/javascript"> var startDate=new countup("February 4, 2010 14:41:00", "seconds") // Change starting Date Here startDate.oncountup=function(result) { var mycountainer=document.getElementById("holder") mycountainer.innerHTML=+result['seconds'] } </script> </body> </html>
<div style="font-size:50px">Some Text</div>
big {font-size: 50px;}
<big>Some Text</big>
<div id="holder"></div>
#holder{ font-size: 100px; }
html
css
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)