![](/img/trans.png)
[英]I'm trying to make a specific input into a text area call a specific javascript function, but it won't work
[英]I'm trying to insert a text but the input field on my local terminal won't let me
正如您從我的 Visual Studio Code 中看到的代碼,如果我呈現代碼,它不會讓我在文本輸入中輸入
那是因為<input />
具有恆定值,因此您需要將value
更改為defaultValue
。
<input
type="text"
placeholder="Insert text"
defaultValue={this.state.newItem}
onChange={() => {}}
/>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.