Qatrix
Qatrix copied to clipboard
$ready中浏览器差异
a.html $ready(function (){ var container = $("Main"); }
b.html
<iframe src = "a.html">
在ie浏览器下 container 为NULL
非ie浏览器下 正常
Could you like to post all source code of a.html and b.html?
If you want to call ready function after iframe is loaded on IE, just load Qatrix framework and call ready function under iframe.
a.html
<html>
<head>
<title>testa</title>
<script type="text/javascript" src="qatrix-1.0.1.min.js"></script>
<script type="text/javascript">
$ready(function (){
alert($("Main"));
});
</script>
</head>
<body>
<div id = "Main"></div>
</body>
</html>
b.html
<html>
<head>
<title>testb</title>
</head>
<body>
<iframe src = "a.html" marginwidth="0" marginheight="0" width = "100%" height = "100%" ></iframe>
</body>
</html>
直接开a.html 正确 开b.html 就null了