17-8-26-webapp Summary

Source: Internet
Author: User

Recently learned to connect in JS and use SQL statements to manipulate the database, learning Ajax asynchronous submission request and return response, learning Jason data to string and jade syntax and connect to the response, learning the Web application development of the whole process, Learned to use the JS language from the front to the back-end full stack development.

# # #前端

Use bootstrap to design an HTML page to be placed in public, showing the user interface of the operation. Embedded in a section of the JS code, the implementation of the HTML elements through the DOM, or connect Vue, to get the user input values, and then through the Ajax technology to implement the page can also be updated on the back end of the return value on the page. The value of the URI that is spelled out by a function is included in the request, and in the Ajax callback function, it is sent to the back-end app.js route in the form of get.

# # #后端

Routing principle, In App.js, the different routes and events are bound by a App.use method, and the request sent by the front-end is dispatched to the corresponding response function in the routes, in the Denglu.js route, in the App.get to get the value of the Req.uri in the front end, and then resolve the user in the front-end submitted by the name and The password value, then connects to the database, queries the user information of the stored object through the SQL statement, and then iterates through the key values of the name and password of each object through a loop, then constructs the for If loop and determines whether the data is consistent, The Xmlhttp.open () method of Ajax is used to asynchronously transmit the corresponding response results back to the front end and display it.

17-8-26-webapp Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.