在 React 中 onclick 必須變為 onClick ,如下: <input type="button" onClick={this.writeConsole} value="點我看console" />; 指定函式的方式不是字串。
確定! 回上一頁