TOP /すぐに使えるJavaScript 時計
マウスを当てると表示が切り替わります。

<script type="text/javascript"><!--
backc="blue";               //背景色
fontc="#ffffff";            //文字色
family="Times New Roman";   //フォント
//--------------------------------------------
document.write("<form name='form1'>");
document.write("<input type=button name='time'onMouseover='ch_flag=1' onMouseout='ch_flag=0'")
document.write("style='background-color:"+backc+";color:"+fontc+";font-family:"+family+";width:80;'>");
document.write("</form>")
ch_flag=0;
function nowtime(){
now=new Date();
(now.getHours()<10)?H="0"+now.getHours():H=now.getHours();
(now.getMinutes()<10)?M="0"+now.getMinutes():M=now.getMinutes();
(now.getSeconds()<10)?S="0"+now.getSeconds():S=now.getSeconds();
if(!ch_flag){
document.form1.time.value=H+":"+M+":"+S;
}else{
Mon=now.getMonth()+1;
Year=now.getYear();
(Year < 2000)?Year+=1900:Year;
document.form1.time.value=Year+"/"+Mon+"/"+now.getDate();
}
}
setInterval("nowtime()",1000);/* himajin.moo.jp */
// --></script>