Navigate between two PHP files or pages without reloading

时间:2018-02-26 17:49:23

标签: javascript php jquery

I have 2 PHP file one is index.php and other is gallery.php.

I would like users to be able to move between index.php and gallery.php (and vice versa) without reloading or redirecting the current PHP page.

Link to my website: clickatcareerherokupapp.com

1 个答案:

答案 0 :(得分:0)

你可以使用jquery的.load()函数,我认为它是Ajax api的一部分。你可以将php文件加载成一个div,table或者你正在使用的任何dom类型。(假设你只加载由php生成的html内容)在我看来,这比使用本机ajax函数更容易,因为你不必担心返回类型,发送类型等。

相关问题