$.ajax({ type: "GET", url: "test.json", data: { test: $("#test").val(), }, dataType: "json", success: function(data) { $('#resText').empty(); //清空resText里面的所有内容 var html = ''; //你的逻辑 $('#resText').html(html); } });