如何使用ajax从一个php页面获取数据并使用ajax将其传递到另一个php页面
I am trying to get data from one php page and pass it to another page using Ajax.
JS :
$.ajax({
url: "action.php",
success: function(data){
$.ajax({
url: "data.php?id=data"
}
});
action.php :
<?php
$test= 1;
?>
data.php :
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="" src="action.js"></script>
<?php
$id = $_GET['id'];
echo $id;
?>
dtsjq28482
2016/01/28 10:26- php
- ajax
- javascript
- jquery
- 点赞
- 收藏
- 回答
满意答案