|
<script language="JavaScript"> <!-- var Temp2; var timerID = null; var timerRunning = false; function showtime() { now = new Date(); var CurHour = now.getHours(); var CurMinute = now.getMinutes(); var CurMonth = now.getMonth(); var CurDate = now.getDate(); var CurYear = now.getYear(); var CurSecond = now.getSeconds(); now = null; Hourleft1 = 23 - CurHour var Hourleft = Math.abs( Hourleft1 ) Minuteleft1 = 59 - CurMinute var Minuteleft = Math.abs( Minuteleft1 ) Secondleft1 = 59 - CurSecond var Secondleft = Math.abs( Secondleft1 ) if (CurYear==101) {var Yearleft = 101 - CurYear} else {var Yearleft = 2001 - CurYear}; var Monthleft1 = 11 - CurMonth var Monthleft = Math.abs( Monthleft1 ) var Dateleft1 = 31 - CurDate var Dateleft = Math.abs( Dateleft1 ) if (Yearleft!=1) {var ys="s"} else {var ys=""}; if (Monthleft!=1) {var mos="s"} else {var mos=""} if (Dateleft!=1) {var ds="s"} else {var ds=""} if (Hourleft!=1) {var hs="s"} else {var hs=""} if (Minuteleft!=1) {var mis="s"} else {var mis=""} if (Secondleft!=1) {var ss="s"} else {var ss=""} Temp2=Yearleft+' year'+ys+', '+Monthleft+' month'+mos+', '+Dateleft+' day'+ds+','+Hourleft+' hour'+hs+', '+Minuteleft+' minute'+mis+', '+Secondleft+' second'+ss+' до Нового года!' Temp3=Yearleft+' year'+ys+', '+Monthleft+' month'+mos+', '+Dateleft+' day'+ds+', '+Hourleft+' hour'+hs+', '+Minuteleft+' minute'+mis+', '+Secondleft+' second'+ss window.status=Temp2; document.frm.left.value=Temp3; timerID = setTimeout("showtime()",1000); timerRunning = true; } var timerID = null; var timerRunning = false; function stopclock () { if(timerRunning) clearTimeout(timerID); timerRunning = false; } function startclock () { stopclock(); showtime(); } //--> </script>
А этой формой осуществляется вывод данных. <form name="frm"> <input type="textarea" name="left" size=50 value="С Новым годом!"> </form>
|