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

📄 keane_common.js

📁 U盘身份识别软件
💻 JS
📖 第 1 页 / 共 3 页
字号:
<!--

function mainarea(mainlocation,sublocation){
	changelocation(mainlocation,sublocation,6);
	var mainvalue,subvalue;
	mainvalue=mainlocation.options[mainlocation.selectedIndex].value;
	for(i=0;i<sublocation.length;i++){
		subvalue=sublocation.options[i].value;
		if(mainvalue==subvalue){
			if((i+1)==sublocation.length){
				sublocation.options[0].selected=true;				
			}
			else{
				if(sublocation.options[i+1].text.indexOf("├",0)>-1 || sublocation.options[i+1].text.indexOf("└",0)>-1){
					sublocation.options[i+1].selected=true;
				}
				else{
					sublocation.options[0].selected=true;
				}
			}			
			break;
		}	
	}
}	


function mainareaA(mainlocation,sublocation){
	changelocation(mainlocation,sublocation,2);			
}
function mainareaB(mainlocation,sublocation){
	changelocation(mainlocation,sublocation,4);
	var mainvalue,subvalue;
	mainvalue=mainlocation.options[mainlocation.selectedIndex].value;
	for(i=0;i<sublocation.length;i++){
		subvalue=sublocation.options[i].value;
		if(mainvalue==subvalue){
			if((i+1)==sublocation.length){
				sublocation.options[i].selected=true;				
			}
			else{
				if(sublocation.options[i+1].text.indexOf("├",0)>-1 || sublocation.options[i+1].text.indexOf("└",0)>-1){
					sublocation.options[i+1].selected=true;
				}
				else{
					sublocation.options[i].selected=true;
				}
			}			
			break;
		}	
	}
}
function mainareaC(mainlocation,sublocation){
	changelocation(mainlocation,sublocation,1);
	itemvalue=mainlocation.options [mainlocation.selectedIndex].value;
	sublocation.value=itemvalue;				
}
function mainareaD(mainlocation,sublocation){
	changelocation(mainlocation,sublocation,5);
				
}

function subarea(mainlocation,sublocation){
	var mainvalue,subvalue,subtext;
	subvalue=sublocation.options[sublocation.selectedIndex].value;
	subtext=sublocation.options[sublocation.selectedIndex].text;
	if(subtext.indexOf("├",0)==-1 && subtext.indexOf("└",0)==-1){
		i=sublocation.selectedIndex;
		if((i+1)==sublocation.length){
			sublocation.options[0].selected=true;			
		}
		else{
			if((sublocation.options[i+1].text.indexOf("├",0)>-1 || sublocation.options[i+1].text.indexOf("└",0)>-1) && sublocation.options[i].value.length>0){
				sublocation.options[i+1].selected=true;
			}
			else{ 
				sublocation.options[0].selected=true;
			}
		}
		mainlocation.value=subvalue;
		return;
	}
	
	for(i=sublocation.selectedIndex;i>0;i--){
		if(sublocation.options[i].text.indexOf("├",0)==-1 && sublocation.options[i].text.indexOf("└",0)==-1){
			mainlocation.value=sublocation.options[i].value;
			break;
		}
	}
}
function subareaA(mainlocation,sublocation){

	for(i=sublocation.selectedIndex;i>0;i--){
		if(sublocation.options[i].text.indexOf("├",0)==-1 && sublocation.options[i].text.indexOf("└",0)==-1){
			mainlocation.value=sublocation.options[i].value;
			break;
		}
	}

	var mainvalue,subvalue,subtext;
	subvalue=sublocation.options[sublocation.selectedIndex].value;
	subtext=sublocation.options[sublocation.selectedIndex].text;
	if(subtext.indexOf("├",0)==-1 && subtext.indexOf("└",0)==-1){
		i=sublocation.selectedIndex;
		if((i+1)==sublocation.length){
			sublocation.options[0].selected=true;			
		}
		else{
			if((sublocation.options[i+1].text.indexOf("├",0)>-1 || sublocation.options[i+1].text.indexOf("└",0)>-1) && sublocation.options[i].value!=""){
				sublocation.options[i+1].selected=true;
			}
			else{ 
				sublocation.options[0].selected=true;
			}
		}
	}
	
	
}
function subareaB(mainlocation,sublocation){

	for(i=sublocation.selectedIndex;i>=0;i--){
		if(sublocation.options[i].text.indexOf("├",0)==-1 && sublocation.options[i].text.indexOf("└",0)==-1){
			mainlocation.value=sublocation.options[i].value;
			break;
		}
	}	
}
function subareaC(mainlocation,sublocation){

	for(i=sublocation.selectedIndex;i>0;i--){
		if(sublocation.options[i].text.indexOf("├",0)==-1 && sublocation.options[i].text.indexOf("└",0)==-1){
			mainlocation.value=sublocation.options[i].value;
			break;
		}
	}

	var mainvalue,subvalue,subtext;
	subvalue=sublocation.options[sublocation.selectedIndex].value;
	subtext=sublocation.options[sublocation.selectedIndex].text;
	if(subtext.indexOf("├",0)==-1 && subtext.indexOf("└",0)==-1){
		i=sublocation.selectedIndex;
		if((i+1)==sublocation.length){
			sublocation.options[i].selected=true;			
		}
		else{
			if(sublocation.options[i+1].text.indexOf("├",0)>-1 || sublocation.options[i+1].text.indexOf("└",0)>-1){
				sublocation.options[i+1].selected=true;
			}
			else{ 
				sublocation.options[i].selected=true;
			}
		}
	}
	
	
}
function worklocation_additem(mainlocation,sublocation,selectedlocation){
	subitemtext=sublocation.options [sublocation.selectedIndex].text;
	itemvalue=sublocation.options [sublocation.selectedIndex].value;
	if(sublocation.options [sublocation.selectedIndex].text.indexOf("├")>-1 || sublocation.options [sublocation.selectedIndex].text.indexOf("└")>-1)
		itemvalue=mainlocation.options [mainlocation.selectedIndex].value+itemvalue;
	if(selectedlocation.length>0){
		for(i=0;i<selectedlocation.length;i++){
			if((itemvalue+mainlocation.options [mainlocation.selectedIndex].value).indexOf(selectedlocation.options[i].value)>-1 || selectedlocation.options[i].value.length<1)
				return;	
		}
	}
	for(i=0;i<selectedlocation.length;i++){
		if(selectedlocation.options[i].text.indexOf(itemvalue)>-1 || itemvalue.length<1){
			selectedlocation.remove(i);
			if(selectedlocation.length>0)
						i--;
		}
	}
	itemname=mainlocation.options[mainlocation.selectedIndex].text;
	if(mainlocation.selectedIndex>0 && itemvalue.length>0 && (subitemtext.indexOf("├")>-1 || subitemtext.indexOf("└")>-1))
		itemname=itemname+sublocation.options [sublocation.selectedIndex].text;
	itemname=itemname.replace("├-","");
	itemname=itemname.replace("└-","");
	itemname=itemname.replace("-不限","");
	if(itemname.length==0){return;}
	var option=document.createElement("OPTION");
	option.text=itemname;
	option.value=itemvalue;
	if (selectedlocation.length<3) 
	{
		for(i=0;i<selectedlocation.length;i++){
			v=selectedlocation.options[i].value;
			if(v==itemname){return;}	
		}
		selectedlocation.add(option);
	}
}
function worklocation_additemA(mainlocation,sublocation,selectedlocation){
	subitemtext=sublocation.options [sublocation.selectedIndex].text;
	itemvalue=sublocation.options [sublocation.selectedIndex].value;

	itemname=mainlocation.options[mainlocation.selectedIndex].text;
	
	if(selectedlocation.length>0){
		for(i=0;i<selectedlocation.length;i++){
			if((itemvalue+mainlocation.options [mainlocation.selectedIndex].value).indexOf(selectedlocation.options[i].value)>-1 || selectedlocation.options[i].value.length<1)
				return;	
		}
	}
	for(i=0;i<selectedlocation.length;i++){
		if(selectedlocation.options[i].text.indexOf(itemvalue)>-1 || itemvalue.length<1){
			selectedlocation.remove(i);
			if(selectedlocation.length>0)
				i--;
		}
	}
	if(mainlocation.selectedIndex>0 && itemvalue.length>0 && (subitemtext.indexOf("├")>-1 || subitemtext.indexOf("└")>-1))
	itemname=itemname+sublocation.options [sublocation.selectedIndex].text;
	itemname=itemname.replace("├-","");
	itemname=itemname.replace("└-","");
	//itemname=itemname.replace("-不限","");
	if(sublocation.options [sublocation.selectedIndex].text.indexOf("-不限")>-1)
		itemname=subitemtext;
	if(itemname.length==0){return;}
	var option=document.createElement("OPTION");
	option.text=itemname;
	option.value=itemvalue;
	if (selectedlocation.length<3) 
	{
		for(i=0;i<selectedlocation.length;i++){
			v=selectedlocation.options[i].value;
			if(v==itemname){return;}	
		}
		selectedlocation.add(option);
	}
}
function worklocation_removeitem(mainlocation,sublocation,selectedlocation){
	if(selectedlocation.selectedIndex>-1)
		selectedlocation.remove(selectedlocation.selectedIndex);
}
function onWorkLocationClick(mainlocation,sublocation){
	if(sublocation.length<470)
		return;
	val=mainlocation.options[mainlocation.selectedIndex].value;
	for(i=0;i<sublocation.length-1;i++){
		if(val==sublocation.options[i].value){
			if(sublocation.options[i+1].text.indexOf("├")>-1 || sublocation.options[i+1].text.indexOf("└")>-1){
				sublocation.options[i+1].selected=true;	
				break; 
			}
		}
	}
}

function changelocation(mainlocation,sublocation,flag)
{
	var onecount,i,p;
	onecount=0;
	subcat = new Array();
	p=0;
	subcat[p]= new Array("不限","","",1);p++;
	subcat[p]= new Array("北京市-不限","北京","北京",1);p++;
	subcat[p]= new Array("天津市-不限","天津","天津",1);p++;
	subcat[p]= new Array("上海市-不限","上海","上海",1);p++;
	subcat[p]= new Array("重庆市-不限","重庆","重庆",1);p++;
	subcat[p]= new Array("广东省-不限","广东","广东",1);p++;
	subcat[p]= new Array("├-广州市 ","广东","广州",0);p++;
	subcat[p]= new Array("├-深圳市 ","广东","深圳",0);p++;
	subcat[p]= new Array("├-东莞市 ","广东","东莞",0);p++;
	subcat[p]= new Array("├-中山市 ","广东","中山",0);p++;
	subcat[p]= new Array("├-佛山市 ","广东","佛山",0);p++;
	subcat[p]= new Array("├-珠海市 ","广东","珠海",0);p++;
	subcat[p]= new Array("├-惠州市 ","广东","惠州",0);p++;
	subcat[p]= new Array("├-汕头市 ","广东","汕头",0);p++;
	subcat[p]= new Array("├-湛江市 ","广东","湛江",0);p++;
	subcat[p]= new Array("├-潮州市 ","广东","潮州",0);p++;
	subcat[p]= new Array("├-潮阳市 ","广东","潮阳",0);p++;
	subcat[p]= new Array("├-江门市 ","广东","江门",0);p++;
	subcat[p]= new Array("├-汕尾市 ","广东","汕尾",0);p++;
	subcat[p]= new Array("├-茂名市 ","广东","茂名",0);p++;
	subcat[p]= new Array("├-阳江市 ","广东","阳江",0);p++;
	subcat[p]= new Array("├-肇庆市 ","广东","肇庆",0);p++;
	subcat[p]= new Array("├-梅州市 ","广东","梅州",0);p++;
	subcat[p]= new Array("├-云浮市 ","广东","云浮",0);p++;
	subcat[p]= new Array("├-清远市 ","广东","清远",0);p++;
	subcat[p]= new Array("├-韶关市 ","广东","韶关",0);p++;
	subcat[p]= new Array("├-河源市 ","广东","河源",0);p++;
	subcat[p]= new Array("├-揭阳市 ","广东","揭阳",0);p++;
	subcat[p]= new Array("└-不限 ","广东","广东",0);p++;
	subcat[p]= new Array("江苏省-不限","江苏","江苏",1);p++;
	subcat[p]= new Array("├-南京市 ","江苏","南京",0);p++;
	subcat[p]= new Array("├-苏州市 ","江苏","苏州",0);p++;
	subcat[p]= new Array("├-无锡市 ","江苏","无锡",0);p++;
	subcat[p]= new Array("├-扬州市 ","江苏","扬州",0);p++;
	subcat[p]= new Array("├-常州市 ","江苏","常州",0);p++;
	subcat[p]= new Array("├-镇江市 ","江苏","镇江",0);p++;
	subcat[p]= new Array("├-南通市 ","江苏","南通",0);p++;
	subcat[p]= new Array("├-江阴市 ","江苏","江阴",0);p++;

⌨️ 快捷键说明

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