Home >Web Front-end >JS Tutorial >Solution to the problem that jQuery does not have permission when clicking on form submission_jquery
I encountered a problem today. When I click on the form to submit, jQuery does not have permission;
Baidu searched a lot for reasons such as jquery cross-domain. After comparing the projects, I found that there is no such reason; but I was still inspired by it. Using json can prevent such problems, but the methods they provide are relatively It’s complicated and requires changing the front and backend.
I tried the json method that comes with jquery and submitted it successfully!
$.post("actionName.action",{"id":值,"name":值}, function(data){ if(data=="ok"){ alert(ok) } })