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.