Home  >  Article  >  Backend Development  >  php 帖子无刷新评论解决方法

php 帖子无刷新评论解决方法

WBOY
WBOYOriginal
2016-06-13 13:35:56808browse

php 帖子无刷新评论
小弟对ajax略有了解。
想要实现帖子无刷新评论
以下就是我的帖子的smarty模板,外设一个表单,提交到后台

HTML code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->

          <tr>
                 <!-- 头像 -->
        <td>
<img  src="<%7B%24rss%5Bnum%5D.user_avatr%7D>"    style="max-width:90%"  style="max-width:90%" alt=" php 帖子无刷新评论解决方法 " ><br>
        </td>
        

        <td>
        <table border="1" width="400">
            <tr>
                <td>发表于</td>
            </tr>
            <tr>
                <td></td>
            </tr>
            <tr>
                <td>回复次数:</td>
            </tr>
        </table>
        </td>
    </tr>



我想问的就是,后台是用"echo"把sql结果输出么?
还有jquery的ajax.post的回调函数具体应该怎么写?把jquery代码贴给我吧.

------解决方案--------------------
smarty 可与 xajax 无缝结合,为什么要用 jquery 呢
Statement:
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