📜  jsx 选择值更改 - Javascript 代码示例

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

代码示例1
var MySelect = React.createClass({
     getInitialState: function() {
         return {
             value: 'select'
         }
     },
     change: function(event){
         this.setState({value: event.target.value});
     },
     render: function(){
        return(
           

{this.state.value}

); } }); React.render(, document.body);