jsp网站开发四“酷”全书原码
源代码在线查看: department.js
function Expand(id)
{
var imgTag = document.all.tags("img");
var divTag = document.all.tags("div");
var div = null;
var img = null;
img = imgTag.item(id);
div = divTag.item(id);
if(div!=null)
{
if(div.style.display=="none")
{
div.style.display = "";
img.src = "../images/minus.gif";
}
else
{
div.style.display = "none";
img.src = "../images/plus.gif";
}
}
}
function msover()
{
event.srcElement.style.backgroundColor="#ffffff";
event.srcElement.style.cursor = "hand";
}
function msout()
{
event.srcElement.style.backgroundColor="D0E7FF";
event.srcElement.style.cursor = "auto";
}
function allopen()
{
var divTag = document.all.tags("div");
var imgTag = document.all.tags("img");
for(var i=0;i {
if((divTag.item(i)!=null)&&(imgTag.item(i)!=null)){
if(divTag.item(i).style.display=="none"){
divTag.item(i).style.display = "";
imgTag.item(i).src = "../images/minus.gif";
}
}
}
}
function allclose()
{
var divTag = document.all.tags("div");
var imgTag = document.all.tags("img");
for(var i=0;i {
if((divTag.item(i)!=null)&&(imgTag.item(i)!=null)){
if(divTag.item(i).style.display==""){
divTag.item(i).style.display = "none";
imgTag.item(i).src = "../images/plus.gif";
}
}
}
}
function checkdata()
{
if(document.all.txt_bmname.value==""){
alert("请输入部门名称!");
}
document.all.form1.action = "/Org";
document.all.form1.submit();
}
function treeItemSelected(id)
{
var spanTag = document.all.tags("span");
span = spanTag.item(id);
if(span!=null)
{
if(span.style.bg-color=="none")
{
div.style.display = "blue";
img.src = "../images/minus.gif";
}
else
{
div.style.display = "none";
img.src = "../images/plus.gif";
}
}
}