1
我想通過在顯示功能的文本框的值如何在show函數中傳遞文本框的值?
<div id="userComment">
<input type="text" name="comment" id="comment" placeholder="Enter comment here">
<button type="submit" class="postComment" onclick="show()" value="<?php echo $postId ?>">POST</button>
</div>
你到目前爲止嘗試過什麼?這是一個非常簡單的任務,我只能假設你沒有花時間去做任何研究...... – NewToJS
你可以通過它的id獲得文本框,然後獲得它的價值。 –