DIV布局??没用过.请指教一下.麻烦 rainic 帮写点东西.先谢谢.
应该自己先去查资料,先学学。。
<style type="text/css">
.div_td {
float:left;
width:10em;
}
</style>
<script>
function hide(id) {
var div_td = document.getElementById(id);
div_td.style.display="none";
}
function showAll() {
for(var i=1;i<=4;i++) {
document.getElementById("td"+i).style.display="inline";
}
}
</script>
<p>
<input type="button" name="Submit" value="ShowAll" onclick="showAll()" />
</p>
<div>
<div class="div_td" id="td1">
<div>title1 <a href="javascript:;" onclick="hide('td1')">hide</a></div>
<div>content1</div>
<div>content1</div>
<div>content1</div>
<div>content1</div>
</div>
<div class="div_td" id="td2">
<div>title2 <a href="javascript:;" onclick="hide('td2')">hide</a></div>
<div>content2</div>
<div>content2</div>
<div>content2</div>
<div>content2</div>
</div>
<div class="div_td" id="td3">
<div>title3 <a href="javascript:;" onclick="hide('td3')">hide</a></div>
<div>content3</div>
<div>content3</div>
<div>content3</div>
<div>content3</div>
</div>
<div class="div_td" id="td4">
<div>title4 <a href="javascript:;" onclick="hide('td4')">hide</a></div>
<div>content4</div>
<div>content4</div>
<div>content4</div>
<div>content4</div>
</div>
</div>
.div_td {
float:left;
width:10em;
}
</style>
<script>
function hide(id) {
var div_td = document.getElementById(id);
div_td.style.display="none";
}
function showAll() {
for(var i=1;i<=4;i++) {
document.getElementById("td"+i).style.display="inline";
}
}
</script>
<p>
<input type="button" name="Submit" value="ShowAll" onclick="showAll()" />
</p>
<div>
<div class="div_td" id="td1">
<div>title1 <a href="javascript:;" onclick="hide('td1')">hide</a></div>
<div>content1</div>
<div>content1</div>
<div>content1</div>
<div>content1</div>
</div>
<div class="div_td" id="td2">
<div>title2 <a href="javascript:;" onclick="hide('td2')">hide</a></div>
<div>content2</div>
<div>content2</div>
<div>content2</div>
<div>content2</div>
</div>
<div class="div_td" id="td3">
<div>title3 <a href="javascript:;" onclick="hide('td3')">hide</a></div>
<div>content3</div>
<div>content3</div>
<div>content3</div>
<div>content3</div>
</div>
<div class="div_td" id="td4">
<div>title4 <a href="javascript:;" onclick="hide('td4')">hide</a></div>
<div>content4</div>
<div>content4</div>
<div>content4</div>
<div>content4</div>
</div>
</div>
[此贴子已经被作者于2007-1-5 10:41:22编辑过]