Chỉ Đơn Giản Là Đồng Hồ

rongcon

Công Thần CTIT
PHP:
<body>
<script language = "javascript">

<!--This script downloaded from CongTruongIT.Com-->


<!--   JavaScript Clock v2.3 Written By The Transcendent  -->
<!--  Entire script is to be placed wherever you want the clock to be -->
<!-- these are the only variables (9) that you have to change, do not change anything else -->
/*    !!!These specifications are supported in both IE and Netscape. You MUST give these variables a value!!!    */
var clockwidth = 12              //specify the clock width
var clockvalue = "--- Clock ---" //the text in the clock before the body is completly loaded (needs quotes)




/*        !!!!!extra clock looks only available in IE, not supported in netscape!!!!       */

var clockfeatures = "yes"       // do you want the extra looks? if no, you do not have to change the next 5 variables (must keep quotes around yes/no)

var backcolor = "#000000"       //specify background color (needs quotes)
var textcolor = "#eeeeee"       //specify text color (needs quotes)
var borderstyle = "solid"	//specify the type of border ((in quotes, type "original" for the normal style, regardless of your color and width specs) none,dotted,dashed,solid,double,groove,ridge,inset,outset)
var bordercolor = "#a00000"     //specify border color (needs quotes) (type in 0 for the borderwidth if you dont want one)
var borderwidth = 1             //specify border width (a number in pixels, (type in 0 if you dont want one)
var fontfamily = "Arial"        //specify font type (needs quotes) (type in 'null' if you dont care)
<!-- ok, everything is taken care of! now just save the page, sit back and enjoy! -->

document.onLoad = setInterval('chngtme()',100)

if (document.all && clockfeatures=="yes") {document.write("<style> #clock { background: "+backcolor+"; color: "+textcolor+((borderstyle!='original')?'; border: '+bordercolor+' '+borderwidth+'px '+borderstyle+';':';')+" font-family: "+fontfamily+";} </style>")}
function chngtme() {
	var t=new Date()
	var AP=((t.getHours()>=12)?" P.M.":" A.M.")
	var timeValue=""+((t.getHours()>12)?t.getHours()-12:(t.getHours()==0)?12:t.getHours())
	timeValue+=((t.getMinutes()<10)?":0":":")+t.getMinutes()
	timeValue+=((t.getSeconds()<10)?":0":":")+t.getSeconds()
	timeValue+=AP
	document.clock.face.value=timeValue
}
document.write('<center><form name="clock" Action="#"><input id="clock" TYPE="text" NAME="face" SIZE="'+clockwidth+'" VALUE="'+clockvalue+'"></form></center>')
<!--  End JavaScript Clock v2.1  -->
//-->
</script>
</body>

Chỉ Đơn Giản Là Đồng Hồ Không Cần DEMO
 
Top