下面是我的代码
$(document).ready(function () {
$("#btnView").click(function () {
$.ajax({
url: "Default.aspx/getImages",
type: "POST",
data: "{'chk1' : '" + document.getElementById('chk1').checked + "','chk2' : '" + document.getElementById('chk2').checked + "','chk3' : '" + document.getElementById('chk3').checked + "','chk4' : '" + document.getElementById('chk4').checked + "','chk5' : '" + document.getElementById('chk5').checked + "','chk6' : '" + document.getElementById('chk6').checked + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
success: function (data) {
$("#imagesDiv").html(data.d);
alert($("#imagesDiv").html());
}
});
alert("BEFORE RETURN");
return false;
});
});
我可以在第一个警报中看到 html,但在页面或页面源上看不到 ??? 任何想法为什么会发生这种情况?