转载

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head> <body>
<DIV style="position:relative; top:0px; left:0px; width:80px; height:120px; overflow: hidden">
<SCRIPT language=javascript>
function Year_Month(){
var now = new Date();
var yy = now.getYear();
var mm = now.getMonth()+1;
var cl = '<font color="#000000">';
if (now.getDay() == 0) cl = '<font color="#000000">';
if (now.getDay() == 6) cl = '<font color="#000000">';
return(cl + yy + '年' + mm + '月</font>');
} function Date_of_Today(){
var now = new Date();
var cl = '<font color="#000000">';
if (now.getDay() == 0) cl = '<font color="#000000">';
if (now.getDay() == 6) cl = '<font color="#000000">';
return(cl + now.getDate() + '<b>日</b></font>');
} function Day_of_Today(){
var day = new Array();
day[0] = "星期日";
day[1] = "星期一";
day[2] = "星期二";
day[3] = "星期三";
day[4] = "星期四";
day[5] = "星期五";
day[6] = "星期六";
var now = new Date();
var cl = '<font color="#000000">';
if (now.getDay() == 0) cl = '<font color="#000000">';
if (now.getDay() == 6) cl = '<font color="#000000">';
return(cl + day[now.getDay()] + '</font>');
} function CurentTime(){
var now = new Date();
var hh = now.getHours();
var mm = now.getMinutes();
var ss = now.getTime() % 60000;
ss = (ss - (ss % 1000)) / 1000;
var clock = hh+':';
if (mm < 10) clock += '0';
clock += mm+':';
if (ss < 10) clock += '0';
clock += ss;
return(clock);
} function refreshCalendarClock(){
document.all.calendarClock1.innerHTML = Year_Month();
document.all.calendarClock2.innerHTML = Date_of_Today();
document.all.calendarClock3.innerHTML = Day_of_Today();
document.all.calendarClock4.innerHTML = CurentTime();
}
document.write('<table border="0" cellpadding="0" cellspacing="1" width="68" bgcolor="#000000" height="60">');
document.write('<tr><td width="100%" height="100%" align="center">');
document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%" hight="100%" bgcolor="#f2f2f2" height="60">');
document.write('<tr><td align="center" width="100%" height="100%">');
document.write('<font id="calendarClock1" style="font-family:宋体;font-size:9pt"> </font><br>');
document.write('<font id="calendarClock2" style="font-family:Arial;font-size:14pt;Line-Height=100%"> </font><br>');
document.write('<font id="calendarClock3" style="font-family:宋体;font-size:9pt;Line-Height=100%"> </font><br>');
document.write('<font id="calendarClock4" style="color:#000000;font-family:Arial;font-size:8pt;Line-Height=100%"><b> </b></font>');
document.write('</td></tr></table>');
document.write('</td></tr></table>');
setInterval('refreshCalendarClock()',1000); </SCRIPT></DIV>
</body>
</html>

js-读取系统时间的更多相关文章

  1. 标准IO的简单应用,动静态库,读取系统时间并打印,模拟ls -l功能

    2015.2.27星期五,小雨 标准IO实现的复制功能: #include <stdio.h>#include <errno.h> #define N 64 int main( ...

  2. JS获取系统时间--JavaScript基础

    1.网页中实时显示当前时间 <!DOCTYPE html><html lang="en"><head> <meta charset=&qu ...

  3. js获取系统时间

    //------------------------------------获取系统日期时间 var oDate=new Date(); //alert(oDate.getFullYear());// ...

  4. js获取系统时间时自动补齐日期带零

    最近在开发中发现有日期不规范的问题,正常规则应该是yy-mm-dd,而在输出时候却变成yy-mm-d,这是js的date()方法在作怪 解决思路是若在10号前,则自动给它补齐一个0,下面给出解决方法, ...

  5. js 获取系统时间

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. js 当前系统时间

    <script language=Javascript> function time(){ //获得显示时间的div t_div = document.getElementById('sh ...

  7. js 获取系统时间:年月日 星期 时分秒(动态)

    最近再写一个纯html页面,有时间和天气的数据,天气后台给接口,时间要自己获取,我就自己弄了下, <div class="basic"></div> 这是放 ...

  8. JS 通过系统时间限定 动态添加 select option

    虽然是个简单的效果,还是需要积累一下,记录一下: 在八月一号之后,删除最后一项,新添加2016级 — — 2015级 2014级 2013级 2012级 在六月一号之后,删除最后一项,新添加2016级 ...

  9. SQL读取系统时间的语法(转)

    --获取当前日期(如:yyyymmdd) select CONVERT (nvarchar(12),GETDATE(),112) --获取当前日期(如:yyyymmdd hh:MM:ss)select ...

  10. JS实现系统时间(自动)

    转自:https://blog.csdn.net/qq_35607510/article/details/54600563

随机推荐

  1. AC日记——ISBN号码 openjudge 1.7 29

    29:ISBN号码 总时间限制:  1000ms 内存限制:  65536kB 描述 每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包括9位数字.1位识别码和3位分隔符,其规定格式如“x ...

  2. java函数参数默认值

    java函数参数默认值 今天,需要设定java函数参数的默认值,发现按照其它语言中的方法行不通 java中似乎只能通过函数的重载来实现 函数参数默认代码

  3. Eclipse启动时选择workspace设置

    由于一直习惯eclipse中只使用一个工作空间,所以一般在eclipse刚刚安装好后第一次启动时,我就钩上了弹出的工作空间选择的对话框中以后不再提示的钩选. 结果这次突然需要用到它的工作空间提示功能了 ...

  4. HTML 学习笔记 CSS样式(相对定位 绝对定位)

    CSS相对定位 设置为相对定位(relative)的元素会偏移某个距离.元素仍保持其未定位前的形状,他原本所占的空间仍然保留 CSS相对定位 相对定位是一个非常容易掌握的概念,如果对一个元素进行相对定 ...

  5. crontab日常使用梳理

    在日常的运维工作中,对crontab定时任务的制定是再寻常不过的了.根据以往的使用经验梳理如下: 基本格式 :* * * * * command分 时 日 月 周 命令解释:第1列表示分钟1-59 每 ...

  6. Openvpn 公网访问内网

    对于需要从公网访问内网的情况, 需要做如下配置 从公网到内网 除了设置net.ipv4.ip_forward = 1 以外, 还需要设置iptables, 增加两行forward # Generate ...

  7. jdbc连接数据库总结

    jdbc支持多种数据库,比如说oracle, mysql, mssql,现在总结一下连接各种数据库的相关知识 1,mysql连接,代码如下 Class.forName("com.mysql. ...

  8. DEDECMS之二 如何修改模板页

    使用织梦系统最经常是为了仿站,那么模板应该怎么改? 这里主要谈谈关于比较常用的几个模板页 网站主页.列表页.内容页.栏目的调用 1.主页模板 常用组合方法:index.htm + head.htm + ...

  9. noi1696 逆波兰表达式

    1696:逆波兰表达式 http://noi.openjudge.cn/ch0303/1696/ 总时间限制:  1000ms 内存限制:  65536kB 描述 逆波兰表达式是一种把运算符前置的算术 ...

  10. C#加密解密大全

    1.方法一 (不可逆加密)     public string EncryptPassword(string PasswordString,string PasswordFormat )      { ...