Groups
Groups
Sign in
Groups
Groups
就是怕忘了
Conversations
About
Send feedback
Help
ifram自适应屏幕分辨率代码
0 views
Skip to first unread message
Wayn...@gmail.com
unread,
Feb 26, 2009, 10:16:56 PM
2/26/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 就是怕忘了
<iframe src="test.asp" width="100%" frameborder="0" scrolling="no"
name="hj" id="hj"></iframe>
test.asp页面head间增加如下JS代码
<SCRIPT LANGUAGE="JavaScript">
function f_frameStyleResize(targObj){
var targWin = targObj.parent.document.all[targObj.name];
if(targWin != null) {
var HeightValue = targObj.document.body.scrollHeight
if(HeightValue < 600){HeightValue = 600}
targWin.style.pixelHeight = HeightValue;
}
}
function f_iframeResize(){
bLoadComplete = true; f_frameStyleResize(self);
}
var bLoadComplete = false;
window.onload = f_iframeResize;
</SCRIPT>
Reply all
Reply to author
Forward
0 new messages