修改一个JScript小程序

来源:百度知道 编辑:UC知道 时间:2024/05/18 06:03:55
利用显示表格的功能来实现收缩式导航菜单的功能,单击导航超级链接,显示当前菜单的内容.隐藏上一个显示的菜单,让其有规律的隐藏进而实现动画的效果.
源代码如下(图片无法显示,见谅!):

<SCRIPT language=javascript>
function show(obj,maxg,obj2) //显示菜单的自定义函数
{
if(obj.style.pixelHeight<maxg)
{
obj.style.pixelHeight+=maxg/10;
obj.filters.alpha.opacity+=20;
obj2.background="images/title_hide.gif";
if(obj.style.pixelHeight==maxg/10)
obj.style.display='block';
myObj=obj;
mymaxg=maxg;
myObj2=obj2;
setTimeout('show(myObj,mymaxg,myObj2)','5');
}
}
function hide(obj,maxg,obj2) //隐藏菜单的自定义函数
{
if(obj.style.pixelHeight>0)
{
if(obj.style.pixelHeight==maxg/5)
obj.style.display='none';
obj.style.pixelHeight-=maxg/5;
obj.filters.alpha.opacity-=10;
obj2.background="images/title_show.gif";
myObj=obj;
mymaxg=maxg
myObj2=obj2;
setTimeout('hide(myObj,m

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理导航</title>

<SCRIPT language=javascript1.2>
<!--
function showsubmenu(sid){
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none"){
eval("submenu" + sid + ".style.display=\"\";");
}else{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
function cwin(){
if(parent.testframeset.cols!='200,*'){
parent.testframeset.cols='200,*';
}else{
parent.testframeset.cols='-10,*';
}
}
function closenavi() {
w-=10;
if (w>-10) {
window.parent.testframeset.cols = ''+w+',*';repeat=setTimeout("closenavi()",100);
}else {
clearTimeo