首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

跪求高手!怎么获得布局表格中行高的值?

2012-03-25 
跪求高手!!如何获得布局表格中行高的值??在用DW布局时,如何通过程序能获得表格中一个行的行高,并且传递到

跪求高手!!如何获得布局表格中行高的值??
在用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/
我弄的一个网页中中就用到了

热点排行