这是按第2下兰色的横条才开始出效果,就是说第1下没有获得foot.style.display=="none",可是CSS里我定义了
<styletype="text/css">
#top{width:100px;background-color:#00CCFF;height:20px}
#foot{width:100px;background-color:#CCCC00;height:50px;display:none}
</style>
<scriptlanguage="javascript">
<!--
functionqa(){
if(foot.style.display=="none"){
foot.style.display="block";};
else{
foot.style.display="none";}
}
-->
</script>
</head>
<body>
<divid="top"onclick="qa()"></div>
<divid="foot">
</body>
