标签:
1.ajax 中无法将json 对象传到后台,只能将json 的字符串传到后台. 如下:
var json=[{"id":"1","name":"one"},{"id":"2","name":"two"}]; 错误: $(function(){ $.post(URL,{"json":json); } ); 后台接收到的是空对像null 正确: $(function(){ $.post(URL,{"json":JSON.stringify(json)); } );
标签:
原文地址:http://www.cnblogs.com/predisw/p/4786562.html