【发布时间】:2014-12-28 16:14:13
【问题描述】:
我有一个加载函数,当用户滚动到页面底部时会调用该函数。调用“外部”php 文件 (ajax.php)
看起来像这样:
// Post data to ajax.php
$.post('ajax.php', {
action : 'scrollpagination',
number : $settings.nop,
offset : offset,
ajax.php 是一个查询数据库并回显结果的 php 文件。
现在我的问题是我似乎无法弄清楚如何使ajax.php 在某个location 中回显这些结果(在我的index.php 的html 中)。
就我而言,这个位置是我的index.php 文件中的div 容器。
所以,我想在我的index.php 中的这些div 标记中回显来自ajax.php 的结果:
<div id="container123">
//results of ajax.php
</div>
我希望这很清楚。谢谢!
【问题讨论】: