Your jquery Ajax invalidation is related to your jquery introduction path

Source: Internet
Author: User
Tags valid
When you find that your jquery Ajax is not valid, you might as well use the fire bug to debug, then you will find that the hint "$" is invalid, why is there such a hint? It could be a problem with the path you introduced into Jquery.js

jquery does not have to say that you can read the article, you must know that all jquery is the JS framework.

We must use Ajax more or less when we are doing the project.

And if you use jquery ajax, then you need to introduce jquery into the JSP page.

When you find that your jquery Ajax is not valid, you might as well use the fire bug to debug, then you will find that the hint "$" is invalid, why is there such a hint? The reason is very simple, is that you introduce jquery.js path has the problem.

So when you encounter such problems, the first thing to do is to see if your jquery path is problematic.

jquery path:

Copy Code code as follows:


<script src= "<%=path%>/scripts/jquery-1.7.min.js" language= "JavaScript" type= "Text/javascript" > </script>


Jqueryajaxdemo:

Copy Code code as follows:


$.ajax ({
Type: Post, <!--submit-->
URL: "Customer/validatecustomername.do?", <!--commit to which url-- >
Data: "Customername=" +customernamevalue <!--parameters to propagate when submitting-->
DataType: "html", <span style= " White-space:pre "> </SPAN> <!--return value type-->
success:function (returndata) <span style=" White-space: Pre "> </SPAN> <!--data returned after success, and functions executed after successful-->
{

}
}
;

Related Article

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.