this code doesn't work in firefox, in chrome it works and I'm getting results
console.log('send'); $.ajax({ url: my_object.ajax_url, type: 'POST', data: { action: 'sendPhone', phone: '23342342', city: 'sddsfsf', }, beforeSend: function(){ console.log('beforeSend'); }, success: function(msg){ console.log('result = '+msg); return; }, });//end $.ajax
output in chrome and this is output in firefox
Who knows why $.Ajax doesn't work?
It something weird happening in our forest... :(
Try this: `
console.log('send');
$.ajax({
url: my_object.ajax_url,
type: 'POST',
data: {
action: 'sendPhone',
phone: '23342342',
city: 'sddsfsf',
},
beforeSend: function(){
console.log('beforeSend');
}
})
.success(function(msg){
console.log('result = ' + msg);
});
`
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.