Welcome Guest.


Send post request in html and return result

Asked by: Sandra Lee 209 views IT September 16, 2018

I want to make a html interface that calls api to do the query. The request method is a post request, send a post request and then return the value to the page. There are two text boxes in total. After clicking submit, the post request will be automatically replaced. 2 kinds of things, ask Dad directly to paste the code

2 Answers

  1. +5Votes  

    First check the program on the POST page and what should be returned. Submit this page This process is also done with JQUERY. If you only want this effect, this is not advisable. There will be many unexpected errors. It is recommended to build a separate page to handle AJAX requests for the entire site, whether it is maintenance or add functionality. All are good. Use case statements more, so the entire site is structured.

    Jones- September 17, 2018 |

  2. +8Votes  

    It’s not enough to rely on html with API

    John Moore- September 17, 2018 |