js出现问题.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script language="javascript">
function jimko(haha)
{
if(document.getElementById(haha).style.display=="none")
document.getElementById(haha).style.display="block"
else
document.getElementById(haha).style.display="none"
}
var oldid;
function show(id){
var oldDiv,newDiv;
oldDiv=document.getElementById(oldid);
newDiv=document.getElementById(id);
if(oldid){
oldDiv.style.display="none";
newDiv.style.display="block";
}
oldid=id;
}
</script>
<style type="text/css">
.style{
border-bottom:1px red solid;
padding:5px;
background:#00CC00;
text-align:center;
}
#left{
float:left;
margin-right:50px;
width:120px;
}
#right{
float:left;
border:1px red solid;
width:300px;
height:500px;
}
</style>
</head>
<body>
<div id="left">
<div id="m1" class="style" onclick="jimko('m1_news')"><a href="#" >新闻</a></div>
<div id="m1_news" style="display:none;">
<ul>
<li><a href="#" onclick="show('r1')">娱乐</a></li>
<li><a href="#" onclick="show('r2')">军事</a></li>
<li>政治</li>
</ul>
</div>
<div id="m2" class="style"><a href="#" onclick="jimko('m2_music')">音乐</a></div>
<div id="m2_music" style="display:none">
<ul>
<li>歌曲</li>
<li>歌词</li>
<li>歌名</li>
</ul>
</div>
<div id="m3" class="style"><a href="#" onclick="jimko('m3_dianying')">电影</a></div>
<div id="m3_dianying" style="display:none">
<ul>
<li>叶问</li>
<li>眼镜蛇</li>
<li>阿凡达</li>
</ul>
</div>
</div>
<div id="right">
<div id="r1" style="display:none">aaaaaaa</div><br />
<div id="r2" style="display:none">bbbbbbb</div><br />
<div id="r3" style="display:none">ccccccc</div><br />
</div>
</body>
</html>
第一次点击没响应,第二次点击才出现内容。