我试图改变任何现有的文本与任何输入中键入。我尝试从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