2014-09-11 59 views
0

這裏是我的代碼我收到的Ajax調用parsererror到JSON語法錯誤:無效字符

$.ajax({ 
     type: 'GET', 
     url: "<%=request.getContextPath()%>/manageUsers.do", 
     cache: false, 
     data:{ "resultType": "json", "submit": $.i18n.prop('esadmin.manage.users.delete-btn'), "OID": oid }, 
     invokedata: { "OID": oid, "username": username }, 
     contentType: "application/json", 
     dataType: "text", 
     success: deleteUserSuccess, 
     error: deleteUserError 
    }); 
+1

要調用AJAX爲文本數據類型:「文字」和說json? – Shafeeque 2014-09-11 06:18:07

回答

0

嘗試調用它像這樣

$.ajax({ 
     type: 'GET', 
     url: "<%=request.getContextPath()%>/manageUsers.do", 
     cache: false, 
     data:{ "resultType": "json", "submit": $.i18n.prop('esadmin.manage.users.delete-btn'), "OID": oid }, 
     invokedata: { "OID": oid, "username": username }, 
     contentType: "application/json", 
     dataType: "json", 
     success: deleteUserSuccess, 
     error: deleteUserError 
    }); 
相關問題