标签:style io ar color 使用 sp java for on
//-------------特别不成熟的使用了CSS,完成对下拉菜单的隐藏和显示
<html>
<head>hidenMeau</head>
<style type="text/css">
body{color: blue;text-align: center;}
table,form{margin: 0px;padding: 0px;}
table{border:1px solid gray; text-align: center;width: 50px;height: 50px;background: ;margin: 0px auto;display: none;}
form{margin: 50px auto;width: 200px;height: 200px;background: pink;text-align: center;}
</style>
<script type="text/javascript">
function inputBtn(){
var oBtn=document.getElementById(‘inputImgBtn‘);
var oTab=document.getElementById(‘inputTable‘);
if(oTab.style.display==‘block‘) {oTab.style.display=‘none‘;oBtn.src=‘pic/downbtn.jpg‘;}
else {oTab.style.display=‘block‘;oBtn.src=‘pic/upbtn.jpg‘;}
}
</script>
<body>
<h2>This is to show a btn that can control the below submenu hidden or occur.</h2>
<form>
<label></label>
<label>inputMethod<img src="pic/downbtn.jpg" id="inputImgBtn" onclick="inputBtn()"></label>
<table id="inputTable">
<tr>
<td>handwriting</td>
</tr>
<tr>
<td>pinyin</td>
</tr>
<tr>
<td>wubi</td>
</tr>
</table>
</form>
</body>
</html>
标签:style io ar color 使用 sp java for on
原文地址:http://www.cnblogs.com/fleshy/p/4113910.html