点击按钮新建菜单项的函数该怎么写。
function outlook() {
this.titlelist = new Array();
this.itemlist = new Array();
this.addtitle = addtitle;
this.additem = additem;
this.getbytitle = getbytitle;
this.getbyitem = getbyitem;
this.getdefaultnav = getdefaultnav;
}
function theitem(intitle, insort, inkey, inisdefault) {
this.sortname = insort;
this.key = inkey;
this.title = intitle;
this.isdefault = inisdefault;
}
function addtitle(intitle, sortname, inisdefault) {
outlookbar.itemlist[outlookbar.titlelist.length] = new Array();
outlookbar.titlelist[outlookbar.titlelist.length] = new theitem(intitle, sortname, 0, inisdefault);
return (outlookbar.titlelist.length - 1);
}
function additem(intitle, parentid, inkey) {
if (parentid >= 0 && parentid <= outlookbar.titlelist.length) {
insort = "item_" + parentid;
outlookbar.itemlist[parentid][outlookbar.itemlist[parentid].length] = new theitem(intitle, insort, inkey, 0);
return (outlookbar.itemlist[parentid].length - 1);
} else {
additem = -1;
}
// 导航栏配置文件
var outlookbar=new outlook();
var t;
t=outlookbar.addtitle('管理首页','管理首页',1)
outlookbar.additem('按列表模式显示',t,'../SerchReport?city=jiangsu')
outlookbar.additem('按图形模式显示',t,'../chartMode.jsp')
t=outlookbar.addtitle('任务管理','任务管理',1)
outlookbar.additem('新建查询任务',t,'../NewSerchTask.jsp')
outlookbar.additem('查询历史任务',t,'../SerchhistoryTask.jsp')
t=outlookbar.addtitle('运行中的任务','任务管理',1);
outlookbar.additem('任务1',t,'../taskInfo.jsp');
我想在点击按钮的时候才新建运行中的任务的菜单项 任务1 Onclick 调用的函数该怎么写?
...全文
相关推荐
MFC-CEditView实现文件新建、打开保存功能
MFC-CEditView实现文件新建、打开保存功能,适合初学者学习用。
VC 菜单项及工具栏按钮启用与禁用
VC 菜单项及工具栏按钮启用与禁用,SDI与MDI工程均可。VC6.0的源程序,可用VC2010直接打开编译。
PyQt5按钮点击次数限制 实现按钮只能点击三次
# PyQt5按钮点击次数限制 实现按钮只能点击三次 1. 创建 QPushButton 按钮,并绑定自定义函数作为按钮点击事件; 2. 新建整数型变量用于存储按钮点击次数; 3. 在按钮点击函数中定义每次点击变量加一,并判断等于3时将按钮禁用。
易语言自动点击外部窗口上的按钮
根据窗口类名搜索出对应的句柄,调用PostMessageA自动点击外部程序上的按钮。本压缩包内包含主程序和外部程序的源代码,其中外部程序源码供调试试用。
PyQt5按钮点击事件 给按钮绑定事件调用自定义函数 QPushButton
# PyQt5按钮点击事件 给按钮绑定事件调用自定义函数 QPushButton 1. 继承 QWidget 定义自定义窗口类; 1. 在窗口中创建三个 QPushButton 并设置水平布局 QHBoxLayout; 2. 将三个按钮分别绑定自定义函数。


