84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
I didn’t test this method successfully. Can you help me find out what’s wrong?
w3c link
Under Chrome, using XMLHttpRequest to request the file protocol will be considered cross-domain. You can use Firefox to test, or set up a server
https://stackoverflow.com/que...
Ajax file request is definitely not possible. Put the project on the server and let the server return header.html.
You can use node to set up a server yourself, and then make requests
load(url,data,function(response,status,xhr))The url here should be an address that can return a string-like address.Did you understand it wrong? What does it mean to put header.html? Do you want to return the content of the html file?
Under Chrome, using XMLHttpRequest to request the file protocol will be considered cross-domain. You can use Firefox to test, or set up a server
https://stackoverflow.com/que...
Ajax file request is definitely not possible. Put the project on the server and let the server return header.html.
You can use node to set up a server yourself, and then make requests
load(url,data,function(response,status,xhr))
The url here should be an address that can return a string-like address.
Did you understand it wrong? What does it mean to put header.html? Do you want to return the content of the html file?