日期:2014-05-18 浏览次数:20529 次
<table id="tb1"> ... </table> <input type=button onclick="alert(document.all.tb1.offsetHeight)">
------解决方案--------------------
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
function showtable()
{
var table1= document.getElementById("table1");
alert("宽:"+table1.clientWidth);
alert("高:"+table1.clientHeight);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<table id="table1" runat="server"><tr><td> <asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard></td></tr></table>
<input id="Button1" type="button" value="点击我显示table的宽和高" onclick="showtable()" />
</form>
</body>
------解决方案--------------------
http://www.cftea.com/c/2006/12/PCTKER6T0V62S854.asp