EXTJS4.2 时间动态刷新显示
function clockGo() {
Ext.TaskManager.start({
run: function () {
//Ext.getCmp("clock").setText(Ext.Date.format(new Date(), 'g:i:s A'));
var showtime = document.getElementById("time");
var now = new Date();
var date = now.toLocaleString();// //获取日期与时间 如 2014年6月25日 下午4:45:06
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
//var timestr = hours + ":" + minutes + ":" + seconds;
var timestr = date ;
showtime.innerHTML = timestr;
},
interval: 1000//每秒刷新一次
});
} //顶部面板
var north = new Ext.Panel({
frame: true,
plain: true,
height: 56,
border: false,
region: 'north',
items: [{
baseCls: 'x-plain',
border: false,
height: 56,
html: " <TABLE cellSpacing=0 cellPadding=0 width=100% background='/images/header_bg.jpg' border=0> <TR height=56><TD width=260><IMG height=56 src='/images/header_left.jpg' width=260></TD><TD style='FONT-WEIGHT: bold; COLOR: #fff; PADDING-TOP: 20px' align=right>当前时间:<span id=time></span> </div>当前用户:admin <A style='COLOR: #fff' href=''>修改口令</A> <A style='COLOR: #fff' onclick='if (confirm('确定要退出吗?')) return true; else return false;' href='' target=_top>退出系统</A> </TD><TD align=right width=268><IMG height=56 src='/images/header_right.jpg' width=268></TD></TR></TABLE><TABLE cellSpacing=0 cellPadding=0 width=100% border=0><TR bgColor=#1c5db6 height=4><TD></TD></TR></TABLE>"
}],
listeners: {
'render': function () {
clockGo();
}
}
});
EXTJS4.2 时间动态刷新显示的更多相关文章
- Js多国时间动态更新
Js多国时间动态更新 点击下载
- js实现页面时间动态变化
利用函数嵌套和setTimeout函数实现时间动态变化 var myDate = new Date(); myDate.getYear(); //获取当前年份(2位) myDate.getFullYe ...
- 时间动态协同过滤(TimeSVD++)
原作者 原论文地址 http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.379.1951&rep=rep1&type=pd ...
- 在论坛中出现的比较难的sql问题:42(动态行转列 考勤时间动态列)
原文:在论坛中出现的比较难的sql问题:42(动态行转列 考勤时间动态列) 所以,觉得有必要记录下来,这样以后再次碰到这类问题,也能从中获取解答的思路.
- javascript 实现页面显示当前时间 动态读秒
用户进入网站后,出于友好目的,可以添加一些欢迎语句,并且显示系统当前时间,动态读秒的操作.还是直接粘贴代码吧 <script type="text/javascript"&g ...
- winfrom 界面时间动态加载
Timer time1 = new Timer(); private void time1_Tick(object sender, EventArgs e) { lTime.Text = DateTi ...
- Quartz动态添加,修改,删除任务(暂停,任务状态,恢复,最近触发时间)
首页 博客 学院 下载 图文课 论坛 APP 问答 商城 VIP会员 活动 招聘 ITeye GitChat 写博客 小程序 消息 登录注册 关闭 quartz_Cron表达式一分钟教程 09-05 ...
- 动态时间归整/规整/弯曲(Dynamic time warping,DTW)
动态时间规整DTW 在日常的生活中我们最经常使用的距离毫无疑问应该是欧式距离,但是对于一些特殊情况,欧氏距离存在着其很明显的缺陷,比如说时间序列,举个比较简单的例子,序列A:1,1,1,10,2, ...
- ExtJS4 源码解析(一)带项目分析
Ext这个东东太大了,能看完就已经很不错了,完整的源码分析就不敢说了,大概就涉及了类管理,事件管理,数据结构缓存架构,UI组件核心机制,MVC这几个方面,只是挑着源码看的,没有实际完整的使用. 公司的 ...
随机推荐
- javascript三种创建对象的方式
javascript是一种“基于prototype的面向对象语言“,与java有非常大的区别,无法通过类来创建对象.那么,既然是面象对象的,如何来创建对象呢? 一.通过”字面量“方式创建. 方法:将成 ...
- oracle--insert
常规insert语法就不说了,还有些特殊用法 1. insert all into table1(col1,col2) values(v1,v2) into table2(col1,col2) va ...
- CF Amr and Music (贪心)
Amr and Music time limit per test 1 second memory limit per test 256 megabytes input standard input ...
- 关于location.href几种用法的区别
常见的几种开发形式: self.location.href; window.location.href; this.location.href; location.href; parent.locat ...
- 一些xcode5.1创建的工程在xcode6.0下不能编译的问题
这是因为Xcode5.1.1自动选上了arm64架构, 建议解决办法是: Build Settings-ValidArchitectures中却掉arm64
- hostname
http://www.linuxidc.com/Linux/2014-11/109238.htm
- android 使用两个surfaceview 在摄像机画面上绘图
转载自http://blog.csdn.net/jesse__zhong/article/details/24934083 使用双surface,将第一个设置为透明背景,在摄像机上绘制图像,纠结搞了一 ...
- namenode无法启动(namenode格式化失败)
格式化namenode root@node04 bin]# sudo -u hdfs hdfs namenode –format 16/11/14 10:56:51 INFO namenode.Nam ...
- 通过读取配置文件App.config来获取数据库连接字符串
有两种方式://通过读取配置文件来获取连接字符串 第一种方式: App.config 文件的格式: <?xml version="1.0" encoding="ut ...
- asp.net页面与页面之间传参数值
一.利用POST传值 传值asp文件send.aspx 代码如下 复制代码 <form id="form1" runat="server" action ...