简体   繁体   English

IE7中的“对方法或属性访问的意外调用”错误

[英]'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.

相关问题 IE7 / 8中意外调用方法或属性 - Unexpected call to method or property access in IE7/8 Google地图不会仅在IE7中加载:&#39;意外调用方法或属性访问&#39; - Google Map will not load in IE7 only: 'Unexpected call to method or property access' IE中出现奇怪的jQuery错误:对方法或属性访问的意外调用 - Strange jQuery error in IE: Unexpected call to method or property access IE6中的网站中断,显示“意外调用方法或属性访问”错误 - Site breaks in IE6 on “Unexpected call to method or property access” error Javascript IE错误:意外调用方法或属性访问 - Javascript IE error: unexpected call to method or property access 在IE 7中意外调用方法或属性访问 - Unexpected call to method or property access in IE 7 IE中的jQuery错误:意外调用方法或属性 - jQuery error in IE: Unexpected call to method or property jQuery v1.8.3在ie 8中创建错误,即7“对方法或属性访问的意外调用”。 - jQuery v1.8.3 creating error in ie 8 and ie 7 “Unexpected call to method or property access.” JavaScript错误:对方法或属性访问的意外调用 - JavaScript Error:Unexpected Call To Method Or Property Access 为什么此jQuery代码会导致IE8错误:“方法或属性访问意外调用” - Why does this jQuery code cause IE8 error: “UNEXPECTED CALL TO METHOD OR PROPERTY ACCESS”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM