动态获取输入框内的值(onChange)

        <Input style={{ marginTop: '10px', marginRight: '10px', width: '200px' }} onChange={changeInputValue} />
  const changeInputValue = (e) => {
    //e:改变的值都可以监听到
    //console.log(e.target.value)
    //  const action={
    //     type:CHANGE_INPUT,
    //     value:e.target.value
    //  }
    console.log(e.target.value);
  };

 

posted @ 2022-06-23 10:39  SimoonJia  阅读(738)  评论(0)    收藏  举报