body.htc文件
/* CSS Document */
<PUBLIC:COMPONENT>
<PUBLIC:ATTACH EVENT = "onload" FOR = "window" ONEVENT = "resize()"/>
<PUBLIC:ATTACH EVENT = "onresize" FOR = "window" ONEVENT = "resize()"/>
<script>
function resize() {
try{
if(window.name!=""){
if(window.document.body.scrollHeight<490){
window.top.document.getElementById(window.name).style.height=490;
}
else{
window.top.document.getElementById(window.name).style.height=window.document.body.scrollHeight;
}
}
}
catch(e){
}
}
</script>
</PUBLIC:COMPONENT>
样式表中
<!--
BODY {
behavior: url(css/body.htc);
}
-->
/* CSS Document */
<PUBLIC:COMPONENT>
<PUBLIC:ATTACH EVENT = "onload" FOR = "window" ONEVENT = "resize()"/>
<PUBLIC:ATTACH EVENT = "onresize" FOR = "window" ONEVENT = "resize()"/>
<script>
function resize() {
try{
if(window.name!=""){
if(window.document.body.scrollHeight<490){
window.top.document.getElementById(window.name).style.height=490;
}
else{
window.top.document.getElementById(window.name).style.height=window.document.body.scrollHeight;
}
}
}
catch(e){
}
}
</script>
</PUBLIC:COMPONENT>
样式表中
<!--
BODY {
behavior: url(css/body.htc);
}
-->