Home > Backend Development > PHP Tutorial > ajax获取并以post方式发送表单数据

ajax获取并以post方式发送表单数据

WBOY
Release: 2016-06-13 12:32:26
Original
796 people have browsed it

求助:ajax获取并以post方式发送表单数据

本帖最后由 u012296415 于 2013-11-26 11:04:16 编辑
 
 
 you can add a data into this table
 
 <script><br /> function loadXMLDoc ()<br /> {<br /> var xmlhttp;<br /> xmlhttp=new XMLHttpRequest ();<br /> xmlhttp.open("POST","insert.php",true);<br /> xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");<br /> xmlhttp.send("name&sex&birth");<br /> }<br /> </script>
 
 
 name: 
 sex: 
 birth: 
 
 
 
 
以上是网页代码,求助如何获取表单中的数据并用xmlhttp.send发送给insert.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