一个简单的html功能如何实现——我就是想实现点击button实现table的隐藏和显示
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"><html><head><title>button.ht...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>button.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script type="text/javascript">
$(function exchange(){
$("table:visible").hide(500);
$("table:hidden").show(500);
})
</script>
</head>
<body>
<input type="button" value="exch" onclick="exchange()">
<table>
<tr>11111</tr>
<tr>22222</tr>
<tr>33333</tr>
<tr>44444</tr>
</table>
</body>
</html> 展开
<html>
<head>
<title>button.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script type="text/javascript">
$(function exchange(){
$("table:visible").hide(500);
$("table:hidden").show(500);
})
</script>
</head>
<body>
<input type="button" value="exch" onclick="exchange()">
<table>
<tr>11111</tr>
<tr>22222</tr>
<tr>33333</tr>
<tr>44444</tr>
</table>
</body>
</html> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询