Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyLouvre committed Mar 12, 2013
1 parent 75ecbdf commit d0f754e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
36 changes: 21 additions & 15 deletions navigator.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@
<!DOCTYPE HTML>
<html>
<head>
<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试</title>


<script >

window.navigator.c = function(msg) { alert("这是iframe页面的c方法" + msg); }
window.navigator.d = function(msg) { alert("这是iframe页面的d方法:" + msg); }
alert(window.navigator.a +"!!!!!!!!!")
setInterval(function() { window.navigator.a('aaa'); }, 2000);
setInterval(function() { window.navigator.b('bbb'); }, 2000);
</script>
</head>
<body>
<p>测试IE6-7 的navigator hack</p>
<iframe id="aaa" name="eee" src="http://www.cnblogs.com/rubylouvre/archive/2013/03/12/2956254.html">
<p>测试IE6-7 的navigator hack by 司徒正美</p>
<iframe id="aaa" src="http://www.cnblogs.com/rubylouvre/articles/2956855.html">
</iframe>
<script>
window.navigator.c = function(msg) {
alert("这是iframe页面的c方法" + msg);
}
window.navigator.d = function(msg) {
alert("这是iframe页面的d方法:" + msg);
}
var iframe = document.getElementById("aaa");
iframe.attachEvent && iframe.attachEvent("onload", function() {
alert(window.navigator.a + " !")
alert(iframe.contentWindow.navigator === window.navigator)
setInterval(function() {
window.navigator.a('aaa');
}, 3200);
setInterval(function() {
window.navigator.b('bbb');
}, 3200);
})
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions post.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</script>
</head>
<body>
<p>测试 HTML5的 postmessage</p>
<iframe id="aaa" src="http://www.cnblogs.com/rubylouvre/archive/2013/03/12/2956254.html">
<p>测试 HTML5的 postMessage by 司徒正美</p>
<iframe id="aaa" src="http://www.cnblogs.com/rubylouvre/articles/2956254.html">
</iframe>
</body>
</html>

0 comments on commit d0f754e

Please sign in to comment.