日期:2014-05-17  浏览次数:21127 次

跪求高手!!如何获得布局表格中行高的值??
在用DW布局时,如何通过程序能获得表格中一个行的行高,并且传递到同一页面中其它表格的行中,使它们的行高相同,敬请高手指点,谢谢!!

------解决方案--------------------
<table id= "table1 " border= "1 ">
<tr height= "30px ">
<td> 1111111111111111111
</td>
</tr>
</table>
<table id= "table2 " border= "1 ">
<tr height= "90px ">
<td> 222222222222222
</td>
</tr>
</table>
<input type= "button " value= "粤A粤A粤A " onclick= "ccccc() ">


<script type= "text/javascript ">

function ccccc(){
document.getElementById( "table1 ").childNodes[0].childNodes[0].height=document.getElementById( "table2 ").childNodes[0].childNodes[0].height
}
</script>
------解决方案--------------------
<script language= "javascript ">
//document.getElementById( "main ").style.height=document.getElementById( "right ").scrollHeight+ "px "
if(document.getElementById( "right ").scrollHeight < 375){
document.getElementById( "left ").style.height=375+ "px ";
}
else{
document.getElementById( "left ").style.height=document.getElementById( "right ").scrollHeight+ "px ";
}
</script>
------解决方案--------------------
老大,你给第一个表格中第二列的行加加上ID属性或嵌套个div,如<div id= "a "> </div>
第二个表格中的第三行行高<div id= "b "></div>
if(document.getElementById( "a ").scrollHeight < document.getElementById( "b ").scrollHeight){
document.getElementById( "a ").style.height=document.getElementById( "b ").scrollHeight
}
else{
document.getElementById( "b ").style.height=document.getElementById( "a ").scrollHeight+ "px ";
}

------解决方案--------------------
http://www.uestcms.net/icsssm07/
我弄的一个网页中中就用到了