---
title: "jquery 框架自适应高度_兼容各大主流浏览器"
author: "kk48323201"
date: "2011-04-07T13:33:51Z"
tags: []
categories: ["Web前端"]
slug: "jquery"
draft: false
lastmod: "2011-04-07T13:34:49Z"
id: 990200
url: "https://0756.iteye.com/blog/990200"
---

```javascript

<script type="text/javascript">  
  $(function(){  
     var $iframe=$('#frm');
     $iframe.load(function(){  
     $iframe.height($(this).contents().find("body").height());      

 $(this).contents().find("body").css("overflowy","hidden");  					
      })  
  });  
</script> 

```

实际点，直接上代码,请使用jquery框架