Home  >  Article  >  Backend Development  >  关于jqurey ajax中的json有关问题

关于jqurey ajax中的json有关问题

WBOY
WBOYOriginal
2016-06-13 13:13:30666browse

关于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)

Statement:
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