$.get('http://localhost/a.bb?cmd=<abc></abc>', function(data) { alert('result comes back.'); $('.result').html(data); }); );
Above is the code I want to send to the server, why does jquery send OPTION to me? I want to use the GET method.
Thank.
jQuery / webbrowser will send an HTTPOPTIONS request whenever the URL belongs to a different domain than the one from which this page was created and jQuery dataTypedoesnβt JSONP. Upon request, the OPTIONSserver should return a Allowheader with all the HTTP methods that are allowed to be used. For instance. GET,POST. Then the web browser will continue the actual XMLHttpRequest.
OPTIONS
dataType
JSONP
Allow
GET,POST
.
, , , ,
$.get('http://localhost/a.bb',{"cmd":"<abc></abc>"}, function(data) { alert('result comes back.'); $('.result').html(data); }); );
Source: https://habr.com/ru/post/1770324/More articles:Where to put Google Analytics code in an ASP.NET web application - asp.netInherit a class using a template function - c ++CGAffineTransformMakeRotation before CABasicAnimation - iosRun script after deployment - MSDeploy - .netPopulating DropDownList from DataSource - .netHow to calculate the current position in a large circle - mathcan't install apt on macports - macportsMootools.get ('text') not working properly - javascriptRearrange the string using each x-letter position with PHP - loopsdisplay open nodes in the GWT tree - gwtAll Articles