我正在構建一個公告板系統,我們可以發佈消息並且人們可以回覆該消息。我已經發布了新的消息,做工精細,併爲每一個新的消息,我使用AJAX來創建一個新的錶行的每個消息:使用jQuery隱藏/顯示發佈回覆的表格行
<table id="content-table">
<tr>
<th scope="col" class="messagetime"> <? echo $time; ?> </th>
<th scope="col" class"message body"></th>
<th scope="col" class="messagereply"><form method="GET" action="Rindex.php"><input name="id" type="hidden" value="<? echo $id; ?>"><button type="submit" style="border-style:none;" class="post-icon" /></form></th>
</tr>
</table>
在最後一欄,我有一個形象,他們按我會就像jQuery一樣,在這個下面創建一個新的表格行,並在其中輸入回覆消息的字段,該消息將發佈到該特定消息。
我目前可以得到每封郵件和隱藏一個新的行/顯示所有的人,但我無法弄清楚如何得到的回覆按鈕來指定的唯一行回覆消息:
<table id="content-table">
<tr>
<th scope="col" class="messagetime"> <? echo $time; ?> </th>
<th scope="col" class"message body"></th>
<th scope="col" class="messagereply"><form method="GET" action="Rindex.php"><input name="id" type="hidden" value="<? echo $id; ?>"><button type="submit" style="border-style:none;" class="post-icon" /></form></th>
</tr>
<tr id="replyrow" class="replyrow">
<th scope="col"></th>
<th scope="col" class="replyrowcontent"> <Post Reply Form would be in here.> </th>
<th scope="col"></th>
</tr>
</table>
有什麼建議嗎?我有一種感覺會有一些與父母/子女關係有關的東西,但是我將這種想法概括在我的頭腦中!
我的建議是不要使用TA佈局布萊斯。 –
有什麼建議嗎?你知道這很有趣。看看stackoverflow有一個隱藏的DIV,顯示你何時回覆郵件?我試圖去做那樣的事情...... –