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

📄 functions.js

📁 一个较好的公务员管理系统软件源代码
💻 JS
字号:
var PreiorSel="";
var isDel=false;
function init()
{
    if (parent.frames("AddFunction").window.document.all.tags("TABLE").length>0)
    {
        if (parent.frames("SelBut").window.document.all.tags("BUTTON").length>0)
	     parent.frames("SelBut").document.all.item("btnLeftAll").disabled=(Tb.rows.length>1?0:1);
   }
   if (parent.frames("Buttons").window.document.all.tags("BUTTON").length>0)
 		parent.frames("Buttons").enabledBtns(1);
}

function thisClick()
{
 	var RowID,Row;
 	if (event.button==0 && (event.srcElement.tagName=="TD" || event.srcElement.tagName=="SELECT" ))
  	{
   		if (event.srcElement.tagName=="TD")
      		Row=event.srcElement.parentElement;
  		else
     		Row=event.srcElement.parentElement.parentElement;
  		if (Row.rowIndex>=1)
     		selectThis(Row);
  	}
}
function selectThis(ROWID)
{
	var theIndex;
	if (isDel)
	   PreiorSel="";
	isDel=false;
	if (PreiorSel!="")
	   parent.frames("AddFunction").document.all.item("Tb").rows(PreiorSel).className="Normal";
	ROWID.className="Selected";
	theIndex=parent.frames("FunctionList").document.all.item("FunctionList").selectedIndex;
	if (theIndex>=0)
  	{
    	parent.frames("FunctionList").document.all.item("FunctionList").options(theIndex).selected=false;
    	parent.frames("SelBut").document.all.item("btnRight").disabled=1;
  	}
 	PreiorSel=ROWID.id;
 	setData(ROWID.id);
}

function setData(RowIDSelected)
{
  	parent.frames.item("SelBut").document.all.item("RowID").value=RowIDSelected;
  	parent.frames.item("SelBut").document.all.item("btnLeft").disabled=0;
}


function removeFunction()
{
 	var index,FunCode,FunName,Len
 	index=AddFunForm.SelectedList.selectedIndex;
 	if (index>=0)
 	{
  		FunCode=AddFunForm.SelectedList.options(index).value;
  		FunName=AddFunForm.SelectedList.options(index).text;
  		Len=parent.frames.item("FunctionList").FunctionList.length;
  		parent.frames.item("FunctionList").FunctionList.length=Len+1;
  		parent.frames.item("FunctionList").FunctionList.options(Len).text=FunName;
  		parent.frames.item("FunctionList").FunctionList.options(Len).value=FunCode;
  		AddFunForm.SelectedList.remove(index);
 	}
}

function thisClickdbl()
{
 if (event.button==0 && event.srcElement.tagName=="TD")
  {
    isDel=true;
    if (event.srcElement.parentElement.rowIndex>0)
    {
      setData(event.srcElement.parentElement.id);
      parent.frames.item("SelBut").deleteThis();
    }
  }
}

⌨️ 快捷键说明

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