Home > front end >  To database data web server
To database data web server

Time:12-15

For bosses/predecessors, I am a small white, I've only had a simple understanding, front end their encapsulates a network library and HTTP server, using the canonical parse web request file, recently wanted to leave a message to your own personal website to develop a version of the function, the front post request sent to the server, the server then save the data, this step can implement already wanted to come out, but such as to a person to visit my web site, before the new people how to see the person to leave a message? server at this time should be how to the front page? I'm quite so the dead to prequel to data, to display the words are written in HTML, but the message I don't want to write the information in the HTML, small white how sincerely ask the server to the front-end incoming data! Another problem is that such a transfer js function also need to take to accept parameters?

CodePudding user response:

There are two ways:
1. Is the first time that you want the page rendering to render data out
2. After completion of page rendering, such as js to request put message content in the content server rendering the page, if is js request data, the requested page can carry when parameters (if required parameters, do not need to can not pass)

CodePudding user response:

reference 1st floor Stephen_112 response:
there are two ways:
1. Is the first time that you want the page rendering to render data out
2. After completion of page rendering, such as js to request put message content in the content server rendering the page, if is js request data, the requested page can carry when parameters (if required parameters, do not need to can not pass)

+ 1, helping to add 2, to know about the ajax
  • Related