⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commonaction.js

📁 学生选课系统 赶快来下载啊啊好东西 呵呵啊啊 啊啊啊啊啊
💻 JS
字号:

function doImport(action){
	//判断是否需要做删除动作
	var needImport = false
	var unitid = getUnitId(getEventElement());
	//alert("unitid="+unitid);
	var head = unitid+"._check";
	//alert(head);
	//var checks = document.all(head);
	var checks = getAllElements(head);
	if(!checks) return ;
	/*
	if(checks.length == undefined){		
		if(checks.checked){
			var value = findValue(0);
			//alert("value:" + value);
			if(value != "-1"){
				checks.value = value;
				needImport = true;
			}
		}
	}else{
		*/
	for(var i=0;i<checks.length;i++){		
		if(checks[i].checked){
			var value = findValue(i);
			//alert("value:" + value);
			if(value != "-1"){
				checks[i].value = value;
				needImport = true;
			}
		}
	}
	/*
	}
	*/
	if(!needImport) return ;
	//做删除操作
	//var aunitid = document.all("_commonaction_list.unitid");
	var aunitid = getAllElements("_commonaction_list.unitid")[0];

	if (confirm("确认导入选中Action到单元" + aunitid.value + "吗?")){
		doAction(action);
	}
}

function findValue(index){
	var key = "_commonaction_list.eactionid.";
	//var ids = document.all(key);
	var ids = getAllElements(key);
	if(!ids) return;
	
	if(ids.length == undefined){
		return ids.value;
	}else{
	if(ids.length > index){
		return ids[index].value;
	}
	}
	return "-1";
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -