ajax返回[object Object]的处理办法

2018-08-18 12:24:52

ajax加载失败返回[object Object],此时可以用error或complete接收返回结果data,用data.responseText将返回结果作为String,显示出来,或做其它处理。

function addrow(id){
try {
url : "getrow.php",
type : "post",
data : "id=" + id,
dataType : "html",
error : function(msg) {
success : function(msg) {
} catch (err) {
return true;


When I was young
I'd listen to the radio
Waiting for my favorite songs
When they played I'd sing along
It made me smile
Those were such happy times
And not so long ago
How I wondered where they'd gone
But they're back again
Just like a long lost friend
All the songs I loved so well