2012-03-05 102 views

回答

0

端起來加入的URL IFRAME SRC

<iframe width="100%" height="100%" src="foo.html#http://www.ParentURL.com"></iframe> 

然後在iframe srouce文件訪問它

URL = window.location.hash.substr(1); 
var height = document.body.scrollHeight; 
var pipe = document.getElementById('helpframe'); 
pipe.src = URL + '/helper.html?height='+height+'&cacheb='+Math.random(); 
0

首個解決方案

<iframe width="100%" height="100%" src="foo.html"></iframe> 

第二種解決

<iframe width="auto" height="auto" src="foo.html"></iframe> 

foo.html

<body> 
<div style="width:200px;height:300px;"> 
<p>Your all content</p> 
</div> 
</body>