怎样使iframe框架嵌套,高度自适应! 不晓得你的操作B,C是啥意思是指改变B,C框架大小吗?类似操作frameset的cols,rows?window.parent.document.getElementsByTagName("frameset")[0].cols="200,*"; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://bolm.cn/blog/?p=184简单方法让iFrame自适应高度 a.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <script language="JavaScript"> function $(id){ return document.getElementById(id); } function test(){ alert(0); } </script> <body> <iframe id="f" src="b.html" frameborder=1 scrolling="no"> </iframe> <hr> <h1>a.html</h1> </body></html>b.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <script language="JavaScript"> function $(id){ return document.getElementById(id); } window.onload = window.onresize = setFrameSize; function setFrameSize(){ parent.$("f").style.width = document.body.scrollWidth + 12 + "px"; parent.$("f").style.height = document.body.scrollHeight + 12 + "px"; } function test(){ var o = $("div1"); if (o.style.display == "none") { o.style.display = "block"; } else { o.style.display = "none"; } } </script> <body topmargin=5 rightmargin=5 leftmargin=5 bottommargin=5> <input type="button" value="test" onclick="test();"><hr> <iframe id="f" src="c.html" frameborder=1 scrolling="no"> </iframe> <div id="div1" style="background:blue;width:400px;height:200px;display:none;"> </div> <hr><h1>b.html</h1> </body></html>c.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <script language="JavaScript"> function $(id){ return document.getElementById(id); } window.onload = window.onresize = setFrameSize; function setFrameSize(){ parent.$("f").style.width = document.body.scrollWidth + 12 + "px"; parent.$("f").style.height = document.body.scrollHeight + 12 + "px"; } function test(){ var o = $("div1"); if (o.style.display == "none") { o.style.display = "block"; } else { o.style.display = "none"; } } </script> <body topmargin=5 rightmargin=5 leftmargin=5 bottommargin=5> <input type="button" value="test" onclick="test();"><hr> <div id="div1" style="background:red;width:600px;height:100px;display:none;"> </div> <hr><h1>c.html</h1> </body></html> 当window.onload和window.onresize的时候计算应该需要的大小 当window.onload和window.onresize的时候计算应该需要的大小 <IFRAME border=0 name=content src="index_main.aspx" frameBorder=0 width=js 函数 scrolling=auto //这个很重要onload=this.height=js 函数 target="_blank"></IFRAME> 关于js提取数字问题 js中的编码转换 FireFox图片加载时显示问题 fckeditor 修改的问题 有什么办法列出所有的function吗? 急!!! 按一下按钮,在网页中加一行文字,怎样做? 使用title做出tips效果时,如何使增加tips停留时间? 关于的showModelessDialog问题!!!!! 求大神帮忙,网页点击弹出弹窗后,滑动鼠标,弹窗不动,页面在动..有什么方法可以让页面也不动么 了解jquery和prototype库的朋友帮忙翻译一段 问一下js 控制窗口的问题
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<script language="JavaScript">
function $(id){
return document.getElementById(id);
}
function test(){
alert(0);
}
</script>
<body>
<iframe id="f" src="b.html" frameborder=1 scrolling="no">
</iframe>
<hr>
<h1>a.html</h1>
</body>
</html>
b.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<script language="JavaScript">
function $(id){
return document.getElementById(id);
}
window.onload = window.onresize = setFrameSize;
function setFrameSize(){
parent.$("f").style.width = document.body.scrollWidth + 12 + "px";
parent.$("f").style.height = document.body.scrollHeight + 12 + "px";
}
function test(){
var o = $("div1");
if (o.style.display == "none") {
o.style.display = "block";
}
else {
o.style.display = "none";
}
}
</script>
<body topmargin=5 rightmargin=5 leftmargin=5 bottommargin=5>
<input type="button" value="test" onclick="test();"><hr>
<iframe id="f" src="c.html" frameborder=1 scrolling="no">
</iframe>
<div id="div1" style="background:blue;width:400px;height:200px;display:none;">
</div>
<hr><h1>b.html</h1>
</body>
</html>
c.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<script language="JavaScript">
function $(id){
return document.getElementById(id);
}
window.onload = window.onresize = setFrameSize;
function setFrameSize(){
parent.$("f").style.width = document.body.scrollWidth + 12 + "px";
parent.$("f").style.height = document.body.scrollHeight + 12 + "px";
}
function test(){
var o = $("div1");
if (o.style.display == "none") {
o.style.display = "block";
}
else {
o.style.display = "none";
}
}
</script>
<body topmargin=5 rightmargin=5 leftmargin=5 bottommargin=5>
<input type="button" value="test" onclick="test();"><hr>
<div id="div1" style="background:red;width:600px;height:100px;display:none;">
</div>
<hr><h1>c.html</h1>
</body>
</html>
scrolling=auto //这个很重要onload=this.height=js 函数 target="_blank"></IFRAME>