-
Notifications
You must be signed in to change notification settings - Fork 0
/
test14.html
49 lines (49 loc) · 1.44 KB
/
test14.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="root"></div>
<script src="./build/react.js"></script>
<script src="./build/react-dom.js"></script>
<script src="./build/browser.min.js"></script>
<script src="./build/jquery.min.js"></script>
<script type="text/babel">
let TestClickComponent = React.createClass({
render: function () {
return (
<div>
<button>显示|隐藏</button>
<span>测试点击</span>
</div>
)
}
});
let TestInputComponent = React.createClass({
getInitialState: function () {
return {
inputContent: ''
}
},
render: function () {
return (
<div>
<input type="text" />
<span>{this.state.inputContent}</span>
</div>
)
}
})
ReactDOM.render(
<div>
<TestClickComponent />
<TestInputComponent />
</div>,
document.getElementById('root')
)
</script>
</body>
</html>