jquery+php查询数据库兑现json的例子

WBOY
Release: 2016-06-13 11:10:19
Original
908 people have browsed it

jquery+php查询数据库实现json的例子
哪位有这方面的例子?最近急需这方面的材料


------解决方案--------------------
参考
------解决方案--------------------
test.php
exit(json_encode(array('i1'=>'1','i2'=>'2',)));


jquery ajax请求
$.getJSON(
  "test.php",
  function(json){
    alert("JSON Data:   " + json.i1);
  }
);  

具体的详细的可以查看jquery手册
------解决方案--------------------
数据库查询就查看php手册吧
------解决方案--------------------
test.php
exit(json_encode(array('i1'=>'1','i2'=>'2',)));


jquery ajax请求
$.getJSON(
  "test.php",
  function(json){
  alert("JSON Data: " + json.i1);
  }
);  
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