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-->
{
}
}
;