current position:Home>Ajax case

Ajax case

2022-04-29 08:10:00Chen Chen is trying

Case preparation

page :
 Insert picture description here
JS:
 Insert picture description here

When the client sends the request , If url The second content path of the path request line is /server, Will execute the code in the callback function , And by the response To respond to

function :
 Insert picture description here
View it in a browser :

Enter in the address bar `127.0.0.1:8000/server, Remember this server Namely js On the ninth line of the file server. If it doesn't correspond, it can't be opened , Will report a mistake . I made a mistake , I wrote sever Ooh, ooh, ooh ┭┮﹏┭┮
Then open it like this
 Insert picture description here

copyright notice
author[Chen Chen is trying],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/04/202204290809568597.html

Random recommended