📅  最后修改于: 2022-03-11 15:01:47.201000             🧑  作者: Mango
function postData(actionUrl, method, data) {
var mapForm = $('');
for (var key in data) {
if (data.hasOwnProperty(key)) {
mapForm.append('');
}
}
$('body').append(mapForm);
mapForm.submit();
}
var data= { 'property1': 666, 'property2': 'I am a boy' };
postData('http://urltopostdata.to', 'post', data);