<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>demo1</title> </head> <body> <div id="exemple"></div> <script src="bower_components/react/react.js"></script> <script src="bower_components/react/react-dom.js"></script> <script src="js/browser.min.js"></script> <script type="text/babel"> var MyForm = React.createClass({ render: function(){ return <input type="text" default="Hello Allan!" /> } }); ReactDOM.render(<MyForm></MyForm>, document.getElementById(‘exemple‘)); </script> </body> </html>
时间: 2024-10-14 21:27:09