有一個html頁面包含以下html并包含一個js文件html:<input type="text" name="customValue" id="customValue" value="">.js 文件: class Calc extends React.Component { constructor() { super(); } render() { return (99) } } ReactDOM.render(<Calc />, document.getElementById("customValue"));所以我的問題是如何使用 reactjs 將 customValue 設置為 99?
Reactjs如何將值綁定到現有的輸入元素
一只斗牛犬
2022-01-13 11:04:07