我試圖改變任何現有的文本與任何輸入中鍵入。我嘗試從id =「text」中取出它,但它不起作用,只顯示文本。從輸入ID更改文本
<input type="text" class="form-control" id="text" placeholder="Type your text here.....">
<div class="form-group">
<button>submit</button>
</div>
<div class="form-group" id="response">
<pre>Type some text in the above text field, then log the text out here on button click</pre>
</div>
<script>
$('button').click(function() {
$("#response").text("#text");
});
</script>
'$( 「#響應」)。文字($(「#獲得價值文本「)VAL());' – Satpal