📜  reactjs单选按钮onchange - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:13.177000             🧑  作者: Mango

代码示例1
class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  handleChange = e => {
    const { name, value } = e.target;

    this.setState({
      [name]: value
    });
  };

  render() {
    return (
      
Windows Mac Linux
); } }