2个回答
展开全部
<html>
<head>
<title>利用Dom属性来创建表格</title>
<script type="text/javascript">
function toggle(id){
var tb=document.getElementById(id);
if(tb.style.display=='none') tb.style.display='block';
else tb.style.display='none';
}
</script>
</head>
<body>
<input type="button" value="显示/隐藏" onClick="toggle('table1')"/>
<table border="1" id="table1">
<tr><td>2</td><td>3</td></tr>
</table>
</body>
</html>
<head>
<title>利用Dom属性来创建表格</title>
<script type="text/javascript">
function toggle(id){
var tb=document.getElementById(id);
if(tb.style.display=='none') tb.style.display='block';
else tb.style.display='none';
}
</script>
</head>
<body>
<input type="button" value="显示/隐藏" onClick="toggle('table1')"/>
<table border="1" id="table1">
<tr><td>2</td><td>3</td></tr>
</table>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询