$.ajax({ type : 'GET', url : "http://localhost:8080/getdata", data : "", dataType : "json", contentType : "application/json", success : function(data) { jQuery.each(data,function(key,value){ alert(value.id+" "+value.username); }) // $("#username").text(data.username); // $("#password").text(data.password); //alert(data.get("username")); //window.location.href = data.url; }, error : function(data) { //alert(JSON.stringify(data)); alert("失败"); }, });
SpiringBoot:ajax遍历后台返回List
发布于 2018-05-03 2353 次阅读
Comments | NOTHING