[英]'unexpected call to method or property access' error in IE7
I am loading few aspx pages into a layout page using jquery , It is not working in IE7 and I am getting the error 我正在使用jquery将一些aspx页面加载到布局页面中,但在IE7中不起作用,并且出现了错误
unexpected call to method or property access 意外调用方法或属性
The Layout page 布局页面
<%@ Page Language="C#" AutoEventWireup="false" CodeFile="layout.aspx.cs" Inherits="layout" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title></title>
<script src="script/jquery-1.9.1.min.js" type="text/javascript" ></script>
<script src="script/myScript.js" type="text/javascript" ></script>
<link href="style/theme.css" rel="stylesheet"></link>
</head>
<body class="layout">
<header class="header"></header>
<section class="content"></section>
<footer class="footer"></footer>
</body>
</html>
myScript.js myScript.js
$(function(){
$(".layout .header").load("header.aspx");
$(".layout .footer").load("footer.aspx");
$(".layout .content").load("pages/home.aspx");
});
Header page 标题页
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="header.aspx.cs" Inherits="header" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
header
</body>
</html>
The rest of the pages are similar to header page. 其余页面与标题页相似。 Any idea what has gone wrong? 知道出了什么问题吗?
PS: load
works fine, so I doubt that is the one causing the issue PS: load
工作正常,所以我怀疑这是导致问题的原因之一
IE7 is too old to understand <section><header><footer>
. IE7太旧,无法理解<section><header><footer>
。
Use <div>
instead. 使用<div>
代替。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.