问题
I'm trying to make a post request with jQuery in a web application with the following code :
alert('1');
$.post(server_hostname,
{ method: 'getTimestamp', type: 'text', partnerKey: partnerKey },
function(results, textStatus) {
alert(results)
alert('2');
},
'text');
That's working very well in chrome and firefox on my computer but not in safari for iOS nor in the Android browser. I guess $.post() doesn't success in a mobile browser but why? On the other hand, how can I see the javascript errors output with my iPhone/Android ?
Thanks!
回答1:
you datatype 'text' should be xml, json, script, or html
for more information see jQuery's post documentation
来源:https://stackoverflow.com/questions/8062740/jquery-post-in-mobile-browser-doesnt-work