<textarea readonly="readonly" name="code" class="HTML">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
#div1{width:200px; height:400px; background:#FF9933; display:none;}
</style>
</head>
<body>
<input type="button" value="显示/隐藏" οnclick="show()"/>
<div id="div1">
<ol>
<li>巴拉巴拉</li>
<li>小猪班纳</li>
<li>安奈儿</li>
<li>巴布豆</li>
<li>安踏儿童</li>
</ol>
</div>
<script>
function show(){
var show1 = document.getElementById("div1");
if(show1.style.display=="block"){
show1.style.display="none";
}else{
show1.style.display="block";
}
}
</script>
</body>
</html>
</textarea>
003鼠标点击——显示/隐藏列表
最新推荐文章于 2022-11-04 20:55:00 发布