The callback callback in the $.get () $.post () method parameter of jQuery was not called

  1. in the process of learning jQuery, using the following simplest $.get () script, after debugging on Firefox, we found that the http request was successful, the response status was 200, and there was a normal response body, but the alert method was not executed. What happened?
   

could you tell me what"s going on?

Jul.29,2021

  1. get into the habit of looking at the console and using Console.
  2. is very likely to be cross-domain, you did not look at the console (there is a hint), so it is inexplicable. Cross-domain requests and responses are normally made and received (on the network), but are blocked by the browser's security policy.

first of all, we generally choose developer mode, and the programs behind alert,alert will be terminated. If you need a pop-up box, the effect is encapsulated by yourself. Then, you can try ajax or post instead.

Menu