<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script src="../EscFull.js"></script>
</head>
<body>
<table style="width:100%;height:300;border:1px solid #cccccc;table-layout:fixed;" cellpaddin="1">
<colgroup>
<col width="100" id="test1">
<col width="20" id="test2">
<col>
</colgroup>
<tr>
<td style="background:#ff6600" id="button1">左边</td>
<td style="background:#cccccc;" id="button2">中间</td>
<td style="background:#eeeeee">右边</td>
</tr>
</table>
<script type="text/javascript">
$(document).ready(function () {
$("#button2").click(function () {
$("#test1").hide();
var a = $("#test1").display;
alert(a);
document.getElementById("test1").style.display = "none";
var visible = document.getElementById("test1").style.display=="none";
document.getElementById("test2").style.display = visible ? "" : "none";
document.getElementById("test2").style.width = visible ? "" : "1";
})
})
</script>
</body>
</html>
贴边(效果还不完善)
最新推荐文章于 2024-09-04 20:18:34 发布