我不知道是什么错误:
<script>
function craft()
{
document.getElementById(craft).style.visibility="visible";
document.getElementById(smell).style.visibility="hidden";
document.getElementById(other).style.visibility="hidden";
}
function smell()
{
document.getElementById(craft).style.visibility="hidden";
document.getElementById(smell).style.visibility="visible";
document.getElementById(other).style.visibility="hidden";
}
function other()
{
document.getElementById(craft).style.visibility="hidden";
document.getElementById(smell).style.visibility="hidden";
document.getElementById(other).style.visibility="visible";
}
</script>
<a onclick ="craft()" href="#">Craft</a><br>
<a onclick ="smell()" href="#">Smell</a><br>
<a onclick ="other()" href="#">Other</a><br>
<div id="craft" style="display: none;" >CraftCraftCraftCraftCraftCraftCraft</div><br>
<div id="smell" style="display: none;" >SmellSmellSmellSmellSmellSmellSmell</div><br>
<div id="other" style="display: none;" >OtherOtherOtherOtherOtherOtherOther</div><br>
我试图做一些像菜单一样的想法。当我点击工艺按钮时,只会出现包含
我找不到错误...我在浏览器中尝试了代码,但是出现了链接...当我单击它们时,没有任何反应...