Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery load不';我不在IE8工作_Jquery_Internet Explorer 8_Load - Fatal编程技术网

Jquery load不';我不在IE8工作

Jquery load不';我不在IE8工作,jquery,internet-explorer-8,load,Jquery,Internet Explorer 8,Load,我正在使用一个脚本加载另一个包含post值的页面,以更新SQL查询。 它在safari中工作,但在IE8中不工作。我不知道怎么修理它。 正如您所看到的,页面全部为空,但确实包含元素。 所以我假设.load函数有问题 链接: index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

我正在使用一个脚本加载另一个包含post值的页面,以更新SQL查询。 它在safari中工作,但在IE8中不工作。我不知道怎么修理它。 正如您所看到的,页面全部为空,但确实包含元素。 所以我假设.load函数有问题

链接:

index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Web Gallery | Infinite Scroll</title>
<link rel="stylesheet" href="style.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/jquery.infinitescroll.js"></script>
</head>
<body>

<?php include('includes/connect.php'); ?>   

<div id="content"></div>
</body>
</html>
scroll.php

<? $limit = $_POST['limit']; ?>

<? 
include('includes/connect.php');
$sql = "SELECT name FROM scroll_images LIMIT $limit";
echo "</div>";

$result = mysql_query($sql);

while($row = mysql_fetch_array($result)){
    echo "<div class='post'><img src='img/".$row['name']. ".jpg' /></div>";
}

?>


不确定这是否是你的错误的原因,但是

$("document").ready(function(){ ... }
应该是

$(document).ready(function(){ ... }

您想要的是JS变量
document
而不是字符串
“document”

,这可能是缓存问题

试试看


嗯,这不是解决办法……不幸的是。我用其他版本的模拟器测试了它。但它在IE中似乎根本不起作用。@user1648471:Simulator?什么模拟器?唯一正确的测试是在实际的浏览器版本本身内。MS为每个浏览器版本提供虚拟PC和硬盘映像供免费下载。IMSoP是100%正确的,您不能在
文档中的
周围放置
。ready
。我已经从代码中删除了它。还在真实浏览器版本(IE8)$(“#content”)中对其进行了测试;尝试this@user1648471@RahulMore你不需要一个“?”吗
“scroll.php?”+Math.random()*99999
否则您将得到一个不存在的URL,如“scroll.php12345”。
$(document).ready(function(){ ... }
$("#content").load("scroll.php?" +Math.random()*99999, {limit: counter});