一,单个DIV:
1.用nobr元素
2.用nowrap元素
Code:
二,两个DIV
1. 用CSS里的float属性
2. 用CSS里的diplay属性
多DIV重叠
1.
<script type="text/javascript" language="Javascript">
function changeDivleft_bot(num){
if(num == 1){
left_bot_list1.style.visibility = "visible";
left_bot_list2.style.visibility = "hidden";
left_bot_list3.style.visibility = "hidden";
}
if(num == 2){
left_bot_list1.style.visibility = "hidden";
left_bot_list2.style.visibility = "visible";
left_bot_list3.style.visibility = "hidden";
}
if(num == 3){
left_bot_list1.style.visibility = "hidden";
left_bot_list2.style.visibility = "hidden";
left_bot_list3.style.visibility = "visible";
}
}
//alert(tree.loaded);
</script>
2.
<div id="left_bot_list1" style="display:inline;height:448px;width:222px;overflow:auto">
</div>
<div id="left_bot_list2" style="display:none;height:448px;width:222px;overflow:auto">
</div>
<div id="left_bot_list3" style="display:none;height:448px;width:222px;overflow:auto" >
</div>
<script type="text/javascript" language="Javascript">
function changeDivleft_bot(num){
if(num == 1){
left_bot_list1.style.display = 'inline';
left_bot_list2.style.display = 'none';
left_bot_list3.style.display = 'none';
}
if(num == 2){
left_bot_list1.style.display = 'none';
left_bot_list2.style.display = 'inline';
left_bot_list3.style.display = 'none';
}
if(num == 3){
left_bot_list1.style.display = 'none';
left_bot_list2.style.display = 'none';
left_bot_list3.style.display = 'inline';
}
}
</script>