-
Notifications
You must be signed in to change notification settings - Fork 6
/
frameset.html
32 lines (31 loc) · 1.15 KB
/
frameset.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
<!DOCTYPE html>
<html>
<head>
<script>
var resizeDisabled = false;
addEventListener("message", function() {
resizeDisabled = !resizeDisabled;
if (resizeDisabled){
document.documentElement.style.backgroundColor = "red";
frames[0].window.document.documentElement.style.backgroundColor = "red";
frames[1].window.document.documentElement.style.backgroundColor = "red";
document.getElementById("center").setAttribute("noresize", "");
}else{
document.documentElement.style.backgroundColor = "green";
frames[0].window.document.documentElement.style.backgroundColor = "green";
frames[1].window.document.documentElement.style.backgroundColor = "green";
document.getElementById("center").removeAttribute("noresize");
}
});
</script>
<style>
html {
background-color: green;
}
</style>
</head>
<frameset id="center" name="center" cols="300,*" >
<frame src="frameset-child.html">
<frame src="frameset-child.html">
</frameset>
</html>