如何加载PHP页面 [英] How can I load a PHP page
本文介绍了如何加载PHP页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!
我在通过AJAX加载PHP页面时遇到问题。
Hello, guys!
I have a problem with loading a PHP page via AJAX.
print '<td><a class="edit" href="admin/menu-edit-item.php?ID='.$id.'">Edit</a></td></tr>';
我不知道如何加载'php?ID ='在AJAX加载函数中的一部分。
到目前为止我已尝试过:
I don't know how to load the 'php?ID=' part in the AJAX load function.
I've tried so far this:
print '<td><a class="edit" href="#">Edit</a></td></tr>';
<script>
var id= "<?php print $id; ?>";
$('.edit').click(function(){
$("#menu-content").load('admin/menu-edit-item.php?ID='+id);
});
</script>
但它只获取我表中的最后一个ID,请帮助
but it only gets the last ID in my table, please help
推荐答案
id 。' >编辑< / a>< / td>< / tr>';
我不知道如何在AJAX加载函数中加载'php?ID ='部分。
到目前为止我已尝试过:
I don't know how to load the 'php?ID=' part in the AJAX load function.
I've tried so far this:
print '<td><a class="edit" href="#">Edit</a></td></tr>';
<script>
var id= "<?php print
id; ?>;
id; ?>";
(' 。edit').click( function (){
('.edit').click(function(){
这篇关于如何加载PHP页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文