-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathniki.html~
42 lines (41 loc) · 1.79 KB
/
niki.html~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<link href="css/nikiStyle.css" rel="stylesheet" type="text/css" />
<div class="NikiF">
<iframe align="left" id="NikiFrame" src="Niki_2016.05.18.txt" frameborder="0" border="0" scrolling="0" onload="iFrameHeight(event)"></iframe>
</div>
<script type="text/javascript" language="javascript">
function iFrameHeight(event) {
var ua=navigator.userAgent;
var mobileF=false;
if(ua.match("Mobile") != null ||ua.match("mobile") != null)
{
mobileF=true;
}
//var ifm= document.getElementById("iframepage");
var ifm=event.srcElement||event.target;
//if( ifm == null){ alert("<p>iframe null</p>");}
//else{ alert("<p>"+ifm+"</p>");}
//if( ifm == null){ document.write("<p>iframe null</p>");}
//else{ document.write("<p>"+ifm+"</p>");}
//var subWeb = document.frames ? document.frames["iframepage"].document : ifm.contentDocument;
var subWeb= ifm.contentDocument;
//if(subWeb == null) {document.write("<p>null subWeb !!!!!!!!!!</p>");}
//var subWeb = document.frames ? document.frames["iframepage"].document : ifm.contentDocument;
if(ifm != null && subWeb != null) {
//ifm.height = 1024;
//ifm.height = subWeb.body.scrollHeight ;
if(mobileF)
{
ifm.height = window.screen.height-5;
ifm.width = window.innerWidth * 2;
}else
{
ifm.height = window.screen.height-100;
//ifm.height = subWeb.body.scrollHeight + subWeb.body.scrollHeight + subWeb.body.scrollHeight;
//ifm.width = subWeb.body.scrollWidth;
//ifm.width = subWeb.body.innerWidth;
//ifm.height = document.body.scrollHeight;
ifm.width = window.screen.width-100;
}
}
}
</script>