Use jquery partial refresh (jquery. load) to retrieve data from the database

Source: Internet
Author: User

Because Jquery is a good javascript framework, my use of it is still superficial and in a preliminary learning stage. So I can record my learning experience through my blog, I hope this article will help beginners like me share and make progress together.

Currently, ajax is increasingly favored by web developers. jquery provides good ajax interaction. Here I use a string that is returned directly, and the jquery. load method is used, which is very basic. Project download

Pay attention to the following two points:

1. The jquery. js path should be correct, otherwise it will be difficult to achieve the desired effect.

2. You need to use $ (document ). ready, this method means that after the file is loaded, execute the JS script in it. If you do not add it, it may not be completed in your document organization, the event binding statement has been executed, but your "# load" has not been loaded yet, leading to event binding failure.

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.