帮我看看下javascript代码的错误,分数您尽管说,我后加
这是一个div做的导航菜单functionchange1(){a1=document.getElementById("main1");a1.style.display=(...
这是一个div做的导航菜单
function change1()
{
a1=document.getElementById("main1");
a1.style.display=(a1.style.diaplay=='block'?'none':'block');
}
function change2()
{
a2=document.getElementById("main2");
a2.style.display=(a2.style.diaplay=='block'?'none':'block');
}
</script>
</head>
<body>
<div><a href="javascript:;" onclick="change1()">暗示的法</a></div>
<div id="main1" style=" display:none">vbnmvbnm</div>
<div><a href="javascript:;" onclick="change2()">暗示的法是</a></div>
<div id="main2" style="display:none">bnmvbnm</div>
</body> 展开
function change1()
{
a1=document.getElementById("main1");
a1.style.display=(a1.style.diaplay=='block'?'none':'block');
}
function change2()
{
a2=document.getElementById("main2");
a2.style.display=(a2.style.diaplay=='block'?'none':'block');
}
</script>
</head>
<body>
<div><a href="javascript:;" onclick="change1()">暗示的法</a></div>
<div id="main1" style=" display:none">vbnmvbnm</div>
<div><a href="javascript:;" onclick="change2()">暗示的法是</a></div>
<div id="main2" style="display:none">bnmvbnm</div>
</body> 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询