解决方案 »

  1.   

    用户完后完成输入提交,如果成功,就把提交的内容追加到评论列表。
    具体可以查看ajax使用,以及与php交互。
      

  2.   

    你到网上搜下,ajax异步提交数据,很多案例的,或者直接到jquery官网看使用方法
      

  3.   

    要刷新的页面
    <script src="jquery.min.js" type="text/javascript"></script>
    <script>
    $(function(){
    $("#reload").click(function(){
    $.ajax({
    type:"POST",
    url:"reload.php",
    success:function(msg){
    if(msg) {
    $("#div1").html(msg);
    }
    }

    });
    });
    });
    </script>
     <BODY>
      <div id="div1" style="float:left;width:400px;line-height:30px;margin:100px auto;">从前有座山!</div>
      <div style="width:100px;height:100px;"><input type="button" name="reload" id="reload" value="刷新" /></div> </BODY>
    reload.php页面
    <?php
    echo "刷新之后";
    ?>只是这么个简单例子。
      

  4.   

    client.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
     <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <title> jquery demo </title>
      <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
      <script type="text/javascript">
    function show(){
    $.get( "server.php", function(data) {
    $('#txt').html(data.content);
    }, "json" );
    }
      </script>
     
     </head> <body>
    <p>這裡不會被刷新</p>
    <div id="txt">原來內容</div>
    <input type="button" value="刷新內容" onclick="show()">
     </body>
    </html>
    server.php<?php
    $ret = array();
    $ret['content'] = '新內容';echo json_encode($ret);?>