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获得文本框,然后获得它的价值。 –