PHP? ??? ??? ??? ?? ?? ??
?? ??? ??? LyDB? ??? ??????? ?? ?????.
? ???? ???? ??????? ID? ?????.
???????? id ?? ???? ? ???? ???? ???.
???????? ID? ???? ?? ?? ??? ?????
<?php $sql="selete * from ly where id=$id"; mysqli_query($this->link,$sql); ?>
?? ?? ?? ??? ??? ?????
?? ???? ID? ???? ????. ????? ???? ?????? ???? ??? ?? ???? ?????.
?? ??? ???? ??? ? ????. ???? ?? ???? ???? ?? ???? ?????
<a href="<?php echo $row["id"];?>" class="reply_button">回復(fù)</a>
??? ???? ? ?? ?? ???? ????
<input type="hidden" /> ??? ??? ????? ???? ????. ??? ???? ????? ???? ???? ?? ?? JavaScript? ??? ?? ????.
????? ??? ??? ???? ???? ?????.
??? ?? ????? <??>? ???? ??? ???? ???? ?? ??? ?????. ?? ??.
<script type="text/javascript"> $(".reply_button").click(function(){ if($(this).parent().parent().children(".m").children(".reply_form_wrap").size()==0){ var id=$(this).attr("href"); var reply_form=$("#reply_form").html(); $(this).parent().parent().children(".m").append(reply_form); $(this).parent().parent().children(".m").children(".reply_form_wrap").show(200); $(this).parent().parent().children(".m").children(".reply_form_wrap").children("form").children("input[name='id']").val(id); } return false; }); </script>
??:
parent() ?? ???? ?? ???? ? ??? ?? ??? ?????. ???? ????? ?? ?? ?????.
children()? ?? ???? ?? ????.
attr() ???? ??? ??? ?? ?? ????? ?????.
append() ???? ??? ??? ?? ??? ??? ?????.