关于jqurey ajax中的json有关问题

WBOY
Release: 2016-06-13 13:13:30
Original
707 people have browsed it

关于jqurey ajax中的json问题!
在下面的代码中ajax向php发送了数据,请问我在php中该怎么接收呢?
$.ajax({
type:"get",
url:"a.php",
cache: false,
data:{t1:'a',t2:'b'},
dataType:"json",
success:
function(data)

------解决方案--------------------
$_GET['t1']
$_GET['t2']
------解决方案--------------------
是正确的,别的地方错了,看错误提示
(测试时不行把json先改为html)

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