Invalid jquery Ajax is related to the jquery import path.

Source: Internet
Author: User

Needless to say about jquery. You can read this article. Article And jquery is a JS framework.

Ajax is certainly required for projects.

If jquery's Ajax is used, jquery needs to be introduced to the JSP page.

When you find that jquery Ajax is invalid, use the fire bug to debug it. Then, you will find that the prompt "$" is invalid. Why is this prompt? The reason is that there is a problem with the jquery. js path.

So when you encounter such problems, the first thing you need to do is to check whether there is a problem with your jquery path.

Jquery path:CopyCodeThe Code is as follows:/scripts/jquery-1.7.min.js "Language =" JavaScript "type =" text/JavaScript "> </SCRIPT>

Jqueryajaxdemo:Copy codeThe Code is as follows: $. Ajax ({
Type: "Post", <! -- Submit Method -->
URL: "customer/validatecustomername. do? ", <! -- Submitted to which URL -->
Data: "customername =" + customernamevalue, <! -- Parameters to be propagated during submission -->
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 the function executed after success -->
{

}
}
);

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.