React
-
React input처리(사용자 입력 받기)React 2022. 11. 18. 22:05
주요 코드 import React from 'react'; class Login1 extends React.Component { state = { id: '', password: '' } onChangeText = (evt:any) => { //alert("n:" + evt.target.name + ", v:" + evt.target.value + " id:" + this.state.id); this.setState({ //id: evt.target.value //alert("n:" + evt.target.name); [evt.target.name] : evt.target.value }); } onClickBtn = () => { alert("id:"+this.state.id+`, password:${t..