📄 formchoose.js
字号:
// JScript 文件
var lastRowSelected;
var originalColor;
function GridView_selectRow(row, Name)
{
var hdn=document.form1.hdninput;
hdn.value = Name;
if (lastRowSelected != row)
{
if (lastRowSelected != null)
{
lastRowSelected.style.backgroundColor = originalColor;
lastRowSelected.style.color = 'Black'
lastRowSelected.style.fontWeight = 'normal';
}
originalColor = row.style.backgroundColor
row.style.backgroundColor = 'BLACK'
row.style.color = 'White'
row.style.fontWeight = 'normal'
lastRowSelected = row;
}
}
function additem()
{
var hdn=document.getElementById("hdninput");
var se=document.getElementById("se1");
var option = document.createElement("option");
var str='';
if(hdn.value==null || hdn.value=="" || hdn.value==" ")
{
alert("请选择员工!");
return;
}
else
{
if(se.length>0)
{
//alert(se.length);
for(var i=0; i<se.length; i++)
{
//str+=' '+se.options[i].value;
if(se.options[i].value==hdn.value)
{
alert("请勿输入同一个名字!");
return;
}
}
}
//alert(str);
option.value=hdn.value;
option.text=hdn.value;
se.options.add(option);
}
}
function removeitem()
{
var se=document.getElementById("se1");
if(se.selectedIndex==-1)
return false;
var option=se.options[se.selectedIndex];
se.removeChild(option);
sec.selectedIndex=-1;
}
function GridView_mouseHover(row)
{
row.style.cursor = 'hand';
}
function confirm()
{
var se1=document.getElementById("se1");
var myop=se1.options[se1.selectedIndex];
alert(myop.text);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -