Home > Web Front-end > JS Tutorial > body text

jQuery Precautions and Cause Analysis_jquery

WBOY
Release: 2016-05-16 18:53:41
Original
1231 people have browsed it

1. In addition to a method, there must be a global method of jQuery to start. For example, if I want to call method a for ajax submission, then in any <script></script> tag of the page, add jQuery(function (){}), and this sentence must be placed globally, not inside a method block, otherwise jQuery.post() of method a will not work:

Copy code The code is as follows:


<script> <br>jQuery(function(){}) <br>function a(url){ <br>jQuery.post(url); <br>} <br></script>


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template