谁能给我解释下这段javascript extjs代码
Ext.ns("App");App.init=function(){Ext.QuickTips.init();//主框架varmain=newIndexPage();};...
Ext.ns("App");
App.init = function () {
Ext.QuickTips.init();
//主框架
var main = new IndexPage();
};
App.showMask = function() {
if (!this.loadMask) {
this.loadMask = new Ext.LoadMask(Ext.getBody());
this.loadMask.show();
}
};
App.hideMask = function() {
if (this.loadMask) {
this.loadMask.hide();
this.loadMask = null;
}
};
App.getCurrentSize = function(){
var comSize={height:0,width:0};
var tabPanel = Ext.getCmp('centerTabPanel');
var h = tabPanel.getInnerHeight();
var w = tabPanel.getInnerWidth();
comSize.height=h-1;
comSize.width=w-1;
return comSize;
};
App.getCurrentHeight = function(){
var comSize = this.getCurrentSize();
return comSize.height;
};
App.getCurrentWidth = function(){
var comSize = this.getCurrentSize();
return comSize.width;
};
App.setCookie = function(name, value, day){//三个参数,一个是cookie的名字,一个是值,一个保存天数
var Days = day; //此 cookie 将被保存的天数
var exp = new Date(); //new Date("December 31, 9998");
exp.setTime(exp.getTime() + Days * 1 * 60 * 60 * 1000);
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
}
App.getCookie = function(name){//取cookies函数
var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
if (arr != null)
return unescape(arr[2]);
return null;
};
App.Logout = function() {
window.location.href = "/MyStock/login.jsp";
};
App.logoutSystem = function(){
if ( window.confirm("你确定要注销系统吗? ")) {
window.parent.location.href="../zuxiao.jsp";
}
};
Ext.onReady(App.init); 展开
App.init = function () {
Ext.QuickTips.init();
//主框架
var main = new IndexPage();
};
App.showMask = function() {
if (!this.loadMask) {
this.loadMask = new Ext.LoadMask(Ext.getBody());
this.loadMask.show();
}
};
App.hideMask = function() {
if (this.loadMask) {
this.loadMask.hide();
this.loadMask = null;
}
};
App.getCurrentSize = function(){
var comSize={height:0,width:0};
var tabPanel = Ext.getCmp('centerTabPanel');
var h = tabPanel.getInnerHeight();
var w = tabPanel.getInnerWidth();
comSize.height=h-1;
comSize.width=w-1;
return comSize;
};
App.getCurrentHeight = function(){
var comSize = this.getCurrentSize();
return comSize.height;
};
App.getCurrentWidth = function(){
var comSize = this.getCurrentSize();
return comSize.width;
};
App.setCookie = function(name, value, day){//三个参数,一个是cookie的名字,一个是值,一个保存天数
var Days = day; //此 cookie 将被保存的天数
var exp = new Date(); //new Date("December 31, 9998");
exp.setTime(exp.getTime() + Days * 1 * 60 * 60 * 1000);
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
}
App.getCookie = function(name){//取cookies函数
var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
if (arr != null)
return unescape(arr[2]);
return null;
};
App.Logout = function() {
window.location.href = "/MyStock/login.jsp";
};
App.logoutSystem = function(){
if ( window.confirm("你确定要注销系统吗? ")) {
window.parent.location.href="../zuxiao.jsp";
}
};
Ext.onReady(App.init); 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励20(财富值+成长值)
1个回答
展开全部
Ext.ns("App");
App.init = function () {
Ext.QuickTips.init();
//主框架
var main = new IndexPage();
};//初始化
App.showMask = function() {//遮罩的显示
if (!this.loadMask) {
this.loadMask = new Ext.LoadMask(Ext.getBody());
this.loadMask.show();
}
};
//遮罩的隐藏
App.hideMask = function() {
if (this.loadMask) {
this.loadMask.hide();
this.loadMask = null;
}
};
//获取一个当前tab的大小
App.getCurrentSize = function(){
var comSize={height:0,width:0};
var tabPanel = Ext.getCmp('centerTabPanel');
var h = tabPanel.getInnerHeight();
var w = tabPanel.getInnerWidth();
comSize.height=h-1;
comSize.width=w-1;
return comSize;
};
//获取一个当前tab的高度
App.getCurrentHeight = function(){
var comSize = this.getCurrentSize();
return comSize.height;
};
App.getCurrentWidth = function(){
var comSize = this.getCurrentSize();
return comSize.width;
};
//设置cookie值
App.setCookie = function(name, value, day){//三个参数,一个是cookie的名字,一个是值,一个保存天数
var Days = day; //此 cookie 将被保存的天数
var exp = new Date(); //new Date("December 31, 9998");
exp.setTime(exp.getTime() + Days * 1 * 60 * 60 * 1000);
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
}
App.getCookie = function(name){//取cookies函数
var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
if (arr != null)
return unescape(arr[2]);
return null;
};
////退出
App.Logout = function() {
window.location.href = "/MyStock/login.jsp";
};
//注销系统
App.logoutSystem = function(){
if ( window.confirm("你确定要注销系统吗? ")) {
window.parent.location.href="../zuxiao.jsp";
}
};
Ext.onReady(App.init);//首先调用init方法
App.init = function () {
Ext.QuickTips.init();
//主框架
var main = new IndexPage();
};//初始化
App.showMask = function() {//遮罩的显示
if (!this.loadMask) {
this.loadMask = new Ext.LoadMask(Ext.getBody());
this.loadMask.show();
}
};
//遮罩的隐藏
App.hideMask = function() {
if (this.loadMask) {
this.loadMask.hide();
this.loadMask = null;
}
};
//获取一个当前tab的大小
App.getCurrentSize = function(){
var comSize={height:0,width:0};
var tabPanel = Ext.getCmp('centerTabPanel');
var h = tabPanel.getInnerHeight();
var w = tabPanel.getInnerWidth();
comSize.height=h-1;
comSize.width=w-1;
return comSize;
};
//获取一个当前tab的高度
App.getCurrentHeight = function(){
var comSize = this.getCurrentSize();
return comSize.height;
};
App.getCurrentWidth = function(){
var comSize = this.getCurrentSize();
return comSize.width;
};
//设置cookie值
App.setCookie = function(name, value, day){//三个参数,一个是cookie的名字,一个是值,一个保存天数
var Days = day; //此 cookie 将被保存的天数
var exp = new Date(); //new Date("December 31, 9998");
exp.setTime(exp.getTime() + Days * 1 * 60 * 60 * 1000);
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
}
App.getCookie = function(name){//取cookies函数
var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
if (arr != null)
return unescape(arr[2]);
return null;
};
////退出
App.Logout = function() {
window.location.href = "/MyStock/login.jsp";
};
//注销系统
App.logoutSystem = function(){
if ( window.confirm("你确定要注销系统吗? ")) {
window.parent.location.href="../zuxiao.jsp";
}
};
Ext.onReady(App.init);//首先调用init方法
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询