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

📄 selectitem.js

📁 公务员工资系统软件工程文档及源代码
💻 JS
字号:

var theIndex=0;
function SelectValue()
{
 var index;
 index=theSel.selectedIndex;
 if (index>=0)
  {
   returnValue=theSel.options(index).value;
   window.close();
  }
 }

function enabledBtn()
{
 var index;
 index=theSel.selectedIndex;
 if (index>=0)
  document.getElementById("btnOk").disabled=0;
}

function getData()
{
	if (event.keyCode==13 || event.which==13)
		SelectValue();
}

function ModifySize()
{
  info.innerText="";
  document.getElementById("selTxt").contentEditable =true;
  self.dialogHeight=(theSel.offsetHeight+13)/13;
  self.dialogWidth=(theSel.offsetWidth)/14.2;
  selTxt.size=parseInt(theSel.offsetWidth/7.2);
  selTxt.maxLength=selTxt.size;
}

function getRelateData(theObj)
{
	var tempStr="",theFindStr="";
	var theLength=0;
	var isFind=false,isBack=false;

	if (event.keyCode==8 || event.which==8)
		theIndex=0;

	if (theIndex==null)
		theIndex=0;
	if (event.keyCode==13 || event.which==13)
		SelectValue();
	else
	{
		tempStr=theObj.value;
		theLength=tempStr.length;
		if (tempStr=="" || theLength==0)
		{
			theIndex=0;
			isFind=false;
			document.getElementById("theSel").options(0).selected=true;
			return;
		}
		while (!isFind && theIndex<document.getElementById("theSel").length && theIndex>=0)
		{
			theFindStr=document.getElementById("theSel").options(theIndex).text;
			if (theFindStr.toUpperCase().indexOf(tempStr.toUpperCase())>=0)
			{
				isFind=true;
				document.getElementById("theSel").options(theIndex).selected=true;
			}
			if (isBack && theIndex>0)
				theIndex--;
			else
				theIndex++;
		}
		theIndex=document.getElementById("theSel").selectedIndex;
	}
}

⌨️ 快捷键说明

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