<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="G:/project/myWeb/ReactJS/react-15.3.1/build/react.js"></script>
<script src="G:/project/myWeb/ReactJS/react-15.3.1/build/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
</head>
<body>
<div></div>
<script type="text/label">
var TextClickComponent = React.createClass({
render:function(){
return(
<div>
<button>显示|隐藏</button><span>点击测试</span>
</div>
);
}
});
var TextInputComponent = React.createClass({
getInitialState:function(){
return{
inputContent:''
}
},
render:function(){
return(
<div>
<input type="text" name=""><span>{this.state.inputContent}</span>
</div>
);
}
});
React.render(
<div>
<TextClickComponent/>
<TextInputComponent/>
</div>,
getElementById('container'))
</script>
</body>
</html>