javascript-ajax 获取表单内容然后传递PHP

WBOY
Release: 2016-06-02 11:28:12
Original
1022 people have browsed it

ajaxjavascript表单php

我之前一直在用DOM通过js提取表单内容给PHP做处理,其实也就相当于没用form。。

后来form的内容越来越多了,通过一个个getElementById来获取表单内容然后给PHP越来越不现实了

我在想能不能通过form原本的POST方式(或者有别的方式?)直接将表单内容变成数组,然后js获取数组之后在传递给后台PHP,然后PHP在解析数组做处理,这样做ajax?

可能以上描述不是很专业,忘大神谅解,非常感谢

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!