1 xxxxxxxxxxxxxxxxxxxxxxxxxxx?
  
  回复|引用2 xxxxxxxxxxxxxxxxxxxxxxxxxxx?  回复|引用点击回复后弹出一个js遮罩回复框,然后用AJAX做异步插入.但是有个问题 就是不知道到底是回复那一条留言。比如我要回复第二条留言 但是这个数据库留言流水号2怎样获取呢?谢谢!

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head>
    <script>
    function $(el){return document.getElementById(el)};
    function response(obj)
    {
        var oComment=obj.parentNode;
        oComment.appendChild($("response"));
        $("response").style.display="block";
    }
    function hide() {
                      document.getElementById("response").style.display = "none";

                   }
    </script><div style=" width:1000px; margin:0 auto;">
      <?php
            for($i=0;$i<5;$i++)

    {
           ?>
      <div>
        <div style=" border-bottom:#30F 1px solid;">
          <?=$i.'<p>'?>
        </div>
        <div onclick="response(this);" style="color:red;cursor:pointer; margin:20px; ">回复</div>
      </div>
      <?

            }
    ?>
    </div>
    <div id="response" style="display:none;">
      <textarea style="width:300px;height:150px; margin-left:20px;"></textarea>
      <P>
        <input value="回复" type="submit" style="margin-left:120px;" />
        <input value="取消" type="reset" style="margin-left:20px;" onClick="hide()"/>
    </div>
    </body></html>比如这个 这个流水ID 0 1 2 3 4怎样获取呢?