jquery实现表格table隐藏显示列jquery
<!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>
<me...
<!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" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<script src="/inc/ajax/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".jsj").hide();
$("#jsj_b").click(function(){
if($("#jsj_b").attr('checked')==true) {
$(".jsj").hide();
}else{
$(".jsj").show();
}});
});
</script>
</head>
<body>
<table width="600" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="200" class="jsj">1</td>
<td width="100"> </td>
<td width="300"> </td>
</tr>
<tr>
<td class="jsj">2</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="jsj">3</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="jsj">4</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="jsj">5</td>
<td> </td>
<td> </td>
</tr>
</table>
<input name="jsj_b" type="checkbox" id="jsj_b" checked="checked" />
隐藏结算价
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<script src="/inc/ajax/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".jsj").hide();
$("#jsj_b").click(function(){
if($("#jsj_b").attr('checked')==true) {
$(".jsj").hide();
}else{
$(".jsj").show();
}});
});
</script>
</head>
<body>
<table width="600" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="200" class="jsj">1</td>
<td width="100"> </td>
<td width="300"> </td>
</tr>
<tr>
<td class="jsj">2</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="jsj">3</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="jsj">4</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="jsj">5</td>
<td> </td>
<td> </td>
</tr>
</table>
<input name="jsj_b" type="checkbox" id="jsj_b" checked="checked" />
隐藏结算价
</body>
</html>
上一篇:jquery获取与替换文本框内容
最新评论
热门推荐
我要评论