Home > front end >  Of new great god help, said ajax get json file has been an error 404 Not Found
Of new great god help, said ajax get json file has been an error 404 Not Found

Time:03-31


I want to get four parameters through the first ajax then the background data processing, results will save result. The json file, and then through the second ajax get json file, display into the page,
But, I have been showed 404 Not Found,,,
Why ah, path should be no problem, I VS code can open the file through the link,,,
File directory below:

CodePudding user response:

Result. The json can be accessed by the address of a service?

CodePudding user response:

Not clear your logic; Client access to local JSON file, to get the parameters, and then spread to the server, the server processing after the completion of the results to the client?

CodePudding user response:

Ok, understand it;

Path problem ajax request path if use relative paths to use reference js file relative path of the HTML page

CodePudding user response:

Is the index. The HTML file references, should be "../../result. Json"

CodePudding user response:

You are so direct request json file, 404 is that this is the right path, you wrote if according to the logic shouldn't write as you describe

CodePudding user response:

references in the fifth floor bug of lead a reply:
you are so direct request json file, 404, that's the path you write wrong, if according to your description logic shouldn't write

My path to the above the "../../result is 404,,, "
Of new don't know,,, o that should be how to write, bosses teach

CodePudding user response:


This error message

CodePudding user response:

Under the web root directory of your project is the result. The json file?

CodePudding user response:

Before I also encountered this problem,,, simple to use vue can read data, but instead of vue - element - after the admin not line,
Blogger you this problem solved?

CodePudding user response:

With q, is solved, please

CodePudding user response:

To solve the problem of the path of the la json in HTML
  •  Tags:  
  • Ajax
  • Related