$(function(){ //按钮单击时执行 $("#testAjax").click(function(){ //Ajax调用处理 var html = $.ajax({ type: "GET", url: "login22.php", async: false, dataType:"json", success:function (msg) { alert(msg); } }).responseText; $("#mySpan1").html(html); $("#mySpan2").html(html); }); });
1 回答
李晓健
TA贡献1036条经验 获得超461个赞
var html = $.ajax({
type: "GET",
url: "login22.php",
async: false,
dataType:"json",
success:function (msg) {
$("#mySpan1").html(msg.value1);
$("#mySpan2").html(msg.value2);
}
});- 1 回答
- 0 关注
- 1429 浏览
添加回答
举报
0/150
提交
取消
