»
EnglishFrenchVietnamese

Print - Borderless Clock script - JavaScriptBank.com

Full version: jsB@nk » Time » Clock » Borderless Clock script
URL: https://www.javascriptbank.com/borderless-clock-script.html

Borderless Clock script © JavaScriptBank.comThis clock is a simple input box that is updated every 10th of a second to show the current time. Using short and simple CSS, the borders have been removed and the I-beam does not appear on mouseover. In addition, the input is 'readonly' so nobody can change what it says, if even for a 10th of a second.

Full version: jsB@nk » Time » Clock » Borderless Clock script
URL: https://www.javascriptbank.com/borderless-clock-script.html



CSS
<STYLE>.clock {BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; CURSOR: default; BORDER-RIGHT-WIDTH: 0px}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=javascript>// Author: Corey Ogburnfunction time() {var now= new Date();var hour= now.getHours();var min= now.getMinutes();var sec= now.getSeconds();if (min<10) {min = "0" + min;}if (sec<10) {sec = "0"+sec;}var time= hour+":"+min+":"+sec;timeclock.clock.value = time;setTimeout("time()",100);}function fcs() {document.focus();}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=time();><FORM name=timeclock><INPUT class=clock onclick=fcs() readOnly type=input name=clock></FORM></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->