jquery post in mobile browser doesn't work

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!


you datatype 'text' should be xml, json, script, or html

for more information see jQuery's post documentation

链接地址: http://www.djcxy.com/p/89972.html

上一篇: 在rails中,如何有条件地加载JavaScript文件

下一篇: 在手机浏览器中的jquery帖子不起作用