Internet explorer中的jQuery(Ajax)问题
代码-Internet explorer中的jQuery(Ajax)问题,jquery,ajax,Jquery,Ajax,代码- $.ajax({ url: "edit.php", success: function(html) { $("#last").html(html).hide().slideDown('slow'); alert("hello"); } }); Mozilla表现得很好。如果IE(作为正常的PMS*)没有将任何内容加载到#last中,但显示了警报,那么会出现什么问题 我认为javascript是独立于浏览器的?url中缺少引号:
$.ajax({
url: "edit.php",
success: function(html)
{
$("#last").html(html).hide().slideDown('slow');
alert("hello");
}
});
Mozilla表现得很好。如果IE(作为正常的PMS*)没有将任何内容加载到#last中,但显示了警报,那么会出现什么问题
我认为javascript是独立于浏览器的?url中缺少引号:
$.ajax({
url: 'edit.php',
success: function(html) {
$('#last').html(html).hide().slideDown('slow');
alert('hello');
}
});
页面上是否只有一个ID为
#last
的元素?#load
或#last
?尝试警报($('[id=load]')。长度)
查看页面上是否有任何重复的ID(或用load
代替last
,具体取决于您实际使用的ID)。darlin下面的回答有效。但是我无法让动画工作,即使在Mozilla上,如果没有先隐藏()它也无法工作(引号在那里,对不起,输入错误。如果删除.hide().slideDown('slow')
部分,它工作正常吗?还有为什么要调用.hide()
方法?还不应该颠倒.hide
和.slideDown
调用:$('last').html(html)。slideDown('slow').hide()是的,可以:。但是我现在无法获得动画:[