页面代码:
<ajaxToolkit:TabPanel runat="server">
<HeaderTemplate>
<div>
<img src="img/msngallery/emoticons.png"/>
<div>Emoticons</div>
</div>
</HeaderTemplate>
<ContentTemplate>
<div id="jsclass" style="display:block" runat="server">
<div id="jsclassposition" style="height:25px;text-align:left;font-weight:bold;font-size:14px;color:grey;overflow:hidden;" runat="server"/>
<iframe src="../../classreference/onlinejsclassference/index.htm" id="jsclassiframe" style="width:100%;height:100%" name="jsclassiframe"></iframe>
</div>
</ContentTemplate>
</ajaxToolkit:TabPanel>
怎么实现ifram自适应高度呢,在网上搜索的代码
<script type="text/javascript">
function SetWinHeight(obj) {
var iframe = document.getElementById(obj);//获取iframe
try {
iframe.height = iframe.contentWindow.document.documentElement.scrollHeight + "px";//设置高度
}
catch (ex) {
throw ex;
}
}
</script>
可是实现不了,没变化