Ajax Form 'POST' result as 'GET'

Ajax Form 'POST' result as 'GET'

Hello everyone, I'm learning some Jquery on a website and I was trying to understand how does it work ajax used with forms. I created this simple form which should send all the data using POST:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Ajax Form</title>
  5. <script src="http://code.jquery.com/jquery-3.0.0.js"></script>
  6. </head>
  7. <body>
  8. <div class="row">
  9. <div class="col-md-12">
  10. <h1>Ajax Form</h1>
  11. <form>
  12. <label for="destinatio">Destinazione</label>
  13. <select name="destination" id="destionation">
  14. <option value="londra">londra</option>
  15. <option value="parigi">parigi</option>
  16. <option value="roma">roma</option>
  17. </select>
  18. <br>
  19. <input type="number" name="day">
  20. <br>
  21. <input type="submit" value="book">
  22. </form>
  23. <div class="tour"></div>
  24. </div>
  25. </div>
  26. </body>
  27.   <script type="text/javascript">
  28. $(document).ready(function(){
  29. $($('form').attr('action')).on('submit', function(event){
  30. event.preventDefault();
  31. var form = $(this);
  32. $.ajax('/book.html', {
  33. type: 'POST',
  34.   contentType: 'application/json',
  35. dataType:'json',
  36. data: form.serialize(),
  37. success: function(result){
  38. var msg = $('<p></p>');
  39. //msg.append()
  40.    $('.tour').html(result);
  41.    console.log(this.data)
  42. }
  43. });
  44. });
  45. });
  46. </script>
  47. </html>
The Problem is that if I look inside the Chrome developer tools, inside the Network panel, when I sumbit the form I see that: 

Also on the search bar at the top when I submit something i see the url changes like the data it's sent using GET like this:

Does anyone know why?