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

Solution to the problem that jQuery does not have permission when clicking on form submission_jquery

WBOY
Release: 2016-05-16 16:41:10
Original
1114 people have browsed it

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)
}
})
Copy after login
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!