Home > Backend Development > PHP Tutorial > ajax 取值,该如何处理

ajax 取值,该如何处理

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:47:22
Original
800 people have browsed it

ajax 取值

 <br /> $.ajax({<br />   type: "post",   <br />   url: "ddd.php",   <br />   data: {"inserted":[{"productionName":"空压机","product":"科兴","productionType":"KX-11D","fenjieselect":"分解","proctionNO":"02"},{"productionName":"空压机","product":"科兴","productionType":"KX-12D","fenjieselect":"分解","proctionNO":"03"}],"updated":[],"deleted":[]},   <br />   datatype: "text",<br />   success:function(data){<br />    alert (data);<br /><br /> } <br /><br />})  
Copy after login


我在后台的PHP里如何取到inserted ,updated ,deleted 的值啊?
------解决方案--------------------
你不是写了POST接收吗? 在ddd.php 里面print_r($_POST)
------解决方案--------------------
<?php<br />if($_POST) {<br />  print_r($_POST);<br />  exit;<br />}<br />?><br /><script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script><br /><script><br />$(function() {<br />  $.ajax({<br />    type: "post",   <br />//   url: "ddd.php",   <br />    data: {"inserted":[{"productionName":"空压机","product":"科兴","productionType":"KX-11D","fenjieselect":"分解","proctionNO":"02"},{"productionName":"空压机","product":"科兴","productionType":"KX-12D","fenjieselect":"分解","proctionNO":"03"}],"updated":[],"deleted":[]},   <br />    datatype: "text",<br />    success:function(data){<br />      alert (data);<br />    }<br />  });<br />});<br /></script><br />
Copy after login

Related labels:
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