-
How to send jquery datatables data via Ajax
A: Use: dataTable_instanc().rows().data().toArray()
-
How to send json data via Ajax
A: It need use JSON.stringtify(Array) to make the javascript object/array to be string,
and set the contentType to be: "application/json; charset=utf-8"$.ajax({ ... contentType:"application/json; charset=utf-8", data: JSON.stringtify({'name': 'ryan'}) })
-
How to send Vue instance data via Ajax
A: Use {‘key’: Vue_instance.$data }
$.ajax({ ... contentType:"application/json; charset=utf-8", data: JSON.stringtify({'general': general.$data}) })
暂无评论