您正在设置HTML格式的
#showresults内容
data,然后将其替换为本身,这没有多大意义?
我猜你真正
#showresults在哪里寻找返回的数据,然后
#showresults用ajax调用中的html用html 更新DOM中的元素:
$('#submitform').click(function () { $.ajax({ url: "getinfo.asp", data: { txtsearch: $('#appendedInputButton').val() }, type: "GET", dataType: "html", success: function (data) { var result = $('<div />').append(data).find('#showresults').html(); $('#showresults').html(result); }, error: function (xhr, status) { alert("Sorry, there was a problem!"); }, complete: function (xhr, status) { //$('#showresults').slideDown('slow') } });});


