Demo Input Time(hh:mm:ss) Start Timer : : Code <script src="http://code.jquery.com/jquery-1.7.1.min.js" ></script> <script type="text/javascript"> function init() { var x=($("#time").val()).split(":"); timer.init(x[0],x[1],x[2]); } var timer = { minutes :0, seconds : 0, elm :null, samay : null, sep : ':', init : function(h,m,s) { h = parseInt(h,10); m = parseInt(m,10); s = parseInt(s,10); if(h < 0 || m < 0 || s <0 || isNaN(h) || isNaN(m) || isNaN(s)) { alert('Invalid Values'); return; } this.hours = h; this.minutes = m; this.seconds = s; timer.start(); }, start : function() { this.samay = setInterval((this.doCountDown),1000); }, doCountDown : function() { if(timer.seconds == 0) { if(timer.minutes == 0)