求解释下面这段JS代码的意思,我是刚接触JS的.//初始化var def="1";function mover(object){//主菜单var mm=document.getElementById("m_"+object);mm.className="m_li_a";//初始主菜单隐藏效果if(def!=0){var mdef=document.getElemen
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/16 17:32:56
求解释下面这段JS代码的意思,我是刚接触JS的.//初始化var def="1";function mover(object){//主菜单var mm=document.getElementById("m_"+object);mm.className="m_li_a";//初始主菜单隐藏效果if(def!=0){var mdef=document.getElemen
求解释下面这段JS代码的意思,我是刚接触JS的.
//初始化
var def="1";
function mover(object){
//主菜单
var mm=document.getElementById("m_"+object);
mm.className="m_li_a";
//初始主菜单隐藏效果
if(def!=0){
var mdef=document.getElementById("m_"+def);
mdef.className="m_li";
}
//子菜单
var ss=document.getElementById("s_"+object);
ss.style.display="block";
//初始子菜单隐藏效果
if(def!=0){
var sdef=document.getElementById("s_"+def);
sdef.style.display="none";
}
}
function mout(object){
//主菜单
var mm=document.getElementById("m_"+object);
mm.className="m_li";
//初始主菜单
if(def!=0){
var mdef=document.getElementById("m_"+def);
mdef.className="m_li_a";
}
//子菜单
var ss=document.getElementById("s_"+object);
ss.style.display="none";
//初始子菜单
if(def!=0){
var sdef=document.getElementById("s_"+def);
sdef.style.display="block";
}
}
求解释下面这段JS代码的意思,我是刚接触JS的.//初始化var def="1";function mover(object){//主菜单var mm=document.getElementById("m_"+object);mm.className="m_li_a";//初始主菜单隐藏效果if(def!=0){var mdef=document.getElemen
显示和隐藏层的js