***时间日期***12/24转换时钟
把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件<html>
<title>24/12 hour switch clock</title>
<head>
<script language="javascript">
<!-- this script and many more are available online from -->
<!-- the javascript source!! http://javascriptsource.com -->
<!-- begin
function showmilitarytime() {
if (document.form.showmilitary.checked) {
return true;
}
return false;
}
function showthehours(thehour) {
if (showmilitarytime() || (thehour > 0 && thehour < 13)) {
return (thehour);
}
if (thehour == 0) {
return (12);
}
return (thehour-12);
}
function showzerofilled(invalue) {
if (invalue > 9) {
return "" + invalue;
}
return "0" + invalue;
}
function showampm() {
if (showmilitarytime()) {
return ("");
}
if (now.gethours() < 12) {
return (" am");
}
return (" pm");
}
function showthetime() {
now = new date
document.form.showtime.value = showthehours(now.gethours()) + ":" + showzerofilled(now.getminutes()) + ":" + showzerofilled(now.getseconds()) + showampm()
settimeout("showthetime()",1000)
}
// end -->
</script>
<body onload="showthetime()">
<!-- step three: add the last code in the body of your html document-->
<body>
<center><form name=form>
<input type=text name=showtime size=11><p>
<input type=radio name=showmilitary checked>24小时<br>
<input type=radio name=showmilitary>12小时<br>
</form></center>
--------------------------------------
拥有三人行论坛管理系列软件,一个人就可以管理一个论坛的更新维护。还能使您的论坛有千人在线的真实火暴效果,让您不在为论坛因没有人气而留不住会员而烦恼,使您的论坛早日成为一流的论坛。详情请登陆网站:http://www.cnsrx.cn 三人行论坛管理软件,站长必备的专业好工具。(您使用的是免费版本,购买收费版本后,将不带广告。业务QQ:247216 44985227)
页:
[1]