怎么把json数据输出到HTML的表单中?
$.ajax({type:"POST",url:"mains_seek",data:{"name":$('#name').val(),"phone":$("#phone"...
$.ajax({
type:"POST",
url:"mains_seek",
data:{"name":$('#name').val(),"phone":$("#phone").val()},
success:function(data){
alert(data);
返回的JSON数据:
[{"admin_id":"1","admin_name":"admin","admin_pwd":"14e1b600b1fd579f47433b88e8d85291","admin_headimg":null,"admin_iphone":"dd","admin_email":""},{"admin_id":"35","admin_name":"haha","admin_pwd":"d08f49257fd3f55fed488ef1594d65ec","admin_headimg":null,"admin_iphone":"","admin_email":""}]
想要得到这种效果,一一对应的关系: 展开
type:"POST",
url:"mains_seek",
data:{"name":$('#name').val(),"phone":$("#phone").val()},
success:function(data){
alert(data);
返回的JSON数据:
[{"admin_id":"1","admin_name":"admin","admin_pwd":"14e1b600b1fd579f47433b88e8d85291","admin_headimg":null,"admin_iphone":"dd","admin_email":""},{"admin_id":"35","admin_name":"haha","admin_pwd":"d08f49257fd3f55fed488ef1594d65ec","admin_headimg":null,"admin_iphone":"","admin_email":""}]
想要得到这种效果,一一对应的关系: 展开
2015-01-06 · 知道合伙人软件行家
百度网友ad45923b8
知道合伙人软件行家
向TA提问 私信TA
知道合伙人软件行家
采纳数:262
获赞数:386
从事IT互联网行业16年,经验丰富,擅长ASP、HTML、Javascript,Css,JQuery,PHP,PS,FL,AI,E,服务器等
向TA提问 私信TA
关注
展开全部
$.each(data,function(i,n){
alert(n.admin_id);
});
alert(n.admin_id);
});
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2015-01-06
展开全部
php要转数组处理
或者前台js处理
或者前台js处理
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询