Javascript jQuery选项卡don';不在Internet Explorer中工作,但在Chrome中工作
我需要一些关于我正在构建的web应用程序的帮助。 我正在使用jQuery选项卡。我有两个页面,index.aspx和login.aspx。您从索引页面开始,登录时进入登录页面。 如果我运行谷歌浏览器,两个页面上的标签都可以使用。但是如果我运行IE,第一个页面(index.aspx)工作得很好,但是当我进入login.aspx时,程序中断并跳转到JavaScript文件,然后停止 在JavaScript文件中,我有以下代码:Javascript jQuery选项卡don';不在Internet Explorer中工作,但在Chrome中工作,javascript,jquery,html,asp.net,google-chrome,Javascript,Jquery,Html,Asp.net,Google Chrome,我需要一些关于我正在构建的web应用程序的帮助。 我正在使用jQuery选项卡。我有两个页面,index.aspx和login.aspx。您从索引页面开始,登录时进入登录页面。 如果我运行谷歌浏览器,两个页面上的标签都可以使用。但是如果我运行IE,第一个页面(index.aspx)工作得很好,但是当我进入login.aspx时,程序中断并跳转到JavaScript文件,然后停止 在JavaScript文件中,我有以下代码: $(document).ready(function () {
$(document).ready(function () {
$(function () {
$("#tabs").tabs();
});
});
$(document).ready(function () {
var index = 'key';
var dataStore = window.sessionStorage;
try {
var oldIndex = dataStore.getItem(index);
}
catch (e) {
var oldIndex = 0;
}
$('#tabs').tabs({
active: oldIndex,
activate: function (event, ui) {
var newIndex = ui.newTab.parent().children().index(ui.newTab);
dataStore.setItem(index, newIndex)
}
});
});
它首先在底部功能停止,如果我按continue,它将在顶部功能停止。
我收到的错误消息是“对象不支持此属性或方法”
login.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="Projekt.login" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<title></title>
</head>
<body>
<form id="myform" runat="server">
<div id="content-wrapper">
<div id="content">
<div id="tabs">
<ul>
<li><a href="#tabs-1">tab1</a></li>
<li><a href="#tabs-2">tab2</a></li>
<li><a href="#tabs-3">tab3</a></li>
</ul>
<div id="tabs-1">
</div>
<div id="tabs-2">
</div>
<div id="tabs-3">
</div>
</div>
</div>
</div>
<div id="header-wrapper">
<div id="header" style="height: 81px; top: 0px; left: -1px;">
</div>
</div>
<div id="footer-wrapper">
<div id="footer">
</div>
</div>
</form>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<link rel="stylesheet" href="myCSS.css" type="text/css"/>
<script src="JSprojekt.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.js" type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-2.0.3.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.js" type="text/javascript"></script>
</body>
</html>
请简单一点,我是新手。多谢各位 问题在于:
<script src="http://code.jquery.com/jquery-2.0.3.js" type="text/javascript"></script>
jquery 2.x不支持IE问题在于:
<script src="http://code.jquery.com/jquery-2.0.3.js" type="text/javascript"></script>
jQuery2.x不支持IE