我創建一個評論系統,其結構如下圖所示:我想追加textarea的數據給主要的意見(也更新數據庫)追加textarea的數據回車鍵評論發表
<div id="main_comment_DIV_id_no">
//Some user comment
</div>
<div "reply_DIV">
<textarea name="reply_comment" id="reply_comment" rows="1" style="width:100%">
</textarea>
</div>
部分按下Enter
鍵。
我可以很容易地做到這一點,如果僅僅是有一個(或幾個)DIV
S,但在這裏我有n
數字DIV
其實如此我正在尋找一個解決方案,第n個應答數據追加到其中只有第N main_comment_DIV
。
任何幫助將非常有用?
你在這裏嘗試了什麼? –
添加您的代碼...我們可以嘗試調試它。但創建它完全是你的任務。 – j809
@Ronak和j809感謝您的評論,我只是想知道我應該在這裏應用的邏輯....我試圖運行我的思想,但沒有運氣 – user3478137