Ext.onReady(function(){
Ext.BLANK_IMAGE_URL = "Ext/resources/images/default/s.gif";
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget="qtip";
Ext.apply(Ext.form.VTypes,{
//field表示该宿主组件,val是该宿主的值
repetition:function(val,field) {
//是否配置了相比较的目标组件
if(field.repetition){
//获得该目标组件
var cmp = Ext.getCmp(field.repetition.targetCmpId);
if(Ext.isEmpty(cmp)){
Ext.MessageBox.show({
title: '错误',
msg: '发生异常错误,指定的组件未找到',
icon: Ext.Msg.ERROR,
buttons: Ext.Msg.OK
});
}
//比较宿主和目标对象的值
if(val == cmp.getValue()) {
return true;
} else {
return false;
}
}
},
repetitionText:"两个组件的值不相同"
});
var viewPort = new Ext.Viewport({
title:"个人理财系统",
layout:"border",
items:[
{
title:"标题栏",
region:"north",
height:100,
collapsible:true,
html:"<br><center><font size = 6>网上个人理财系统</font></center>"
},
{
title:"导航栏",
region:"west",
width:200,
items:menu,
collapsible:true,
split:true
},
{
title:"操作区",
region:"center",
items:tabPanel,
collapsible:true
}
]
});
});
我想在标题栏,或者操作区加上动态时间显示,哪位大虾帮我下?
javascript extjs??
------解决方案--------------------
试试!!
------解决方案--------------------
<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">';