赞
踩
<body> <div id="test"></div> <script type="text/babel"> 'use strict' class Demo extends React.Component{ showButton=(event)=>{ console.log(event.target); } render(){ return( <div> <button onClick = {this.showButton}>点我提示左侧的数据</button> </div> ) } } ReactDOM.render(<Demo/>,document.getElementById('test')); </script> </body>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。