سلام
از یک سایت خارجی پیدا کردم
<style>
html{overflow-y: scroll; overflow-x: hidden}
body{font-family: verdana; font-size:12px; padding: 20px}
.close_button
{
float: right; margin-top:-4px;font-family: verdana; font-size: 11px; font-weight: bold; position: relative; background: darkred; color: white; cursor: pointer; padding: 3px
}
</style>
<script>
/* free code from dyn-web.com */
function getDocHeight(doc) {
doc = doc || document;
// from http://stackoverflow.com/questions/1...ith-javascript
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );
return height;
}
function setIframeHeight(id) {
var ifrm = document.getElementById(id);
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
ifrm.style.visibility = 'hidden';
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
ifrm.style.height = getDocHeight( doc ) + 5+"px";
ifrm.style.visibility = 'visible';
}
</script>
<script>
/* script Arie Molendijk - classical-music.tk */
function load_iframe(which_div,which_iframe,url,position_ty pe,width)
{
frames[which_iframe].location.replace(url);
document.getElementById(which_div).style.display=' block';
document.getElementById(which_div).style.backgroun d='transparent';
document.getElementById(which_div).style.width=wid th;
document.getElementById(which_iframe).style.width= document.getElementById(which_div).style.width;
document.getElementById(which_iframe).style.backgr ound='white';
document.getElementById(which_iframe).style.border ='1px solid silver'
document.getElementById(which_iframe).style.positi on=position_type;
if(document.getElementById(which_iframe).style.dis play=='none'){document.getElementById(which_div).s tyle.display='none'}
}
function hide_iframe(which)
{
document.getElementById(which).style.display='none '
}
</script>
<iframe src="int1.php" width="960" marginwidth="0" marginheight="0" name="frmleft" id="frmleft" height="600" border="0" frameborder="0" scrolling="no" onload="setIframeHeight(this.id)">></iframe>