为什么在这段代码之后点击不显示(或不加载)mysite.html?用jQuery.ajax加载页面,它是怎么回事?
$('#icon a').click(function (event) {
event.preventDefault();
$('.table_show, #num_count, #select_box, #input_search').fadeOut('slow', function() {
$.ajax({
url: url,
cache: false,
success: function(html){
$(".results").append(html);
$(this).hide().show();
//$.getScript("http://localhost/Siran-mehdi/files/js/admin.js");
}
});
//.hide().show("slow")
});
});
是什么网址?如果它不是相同的原点,它将不会加载 – mplungjan
可能是百种不同的原因之一。你有什么错误吗? –