forked from RubyLouvre/anu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex8.html
More file actions
62 lines (50 loc) · 1.28 KB
/
Copy pathindex8.html
File metadata and controls
62 lines (50 loc) · 1.28 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<style>
.aaa {
width: 200px;
height: 200px;
background: red;
}
.bbb {
width: 200px;
height: 200px;
background: lawngreen;
}
</style>
<script type='text/javascript' src="./dist/React.js"></script>
<!-- <script src="./test/react.js"></script>
<script src="./test/react-dom.js"></script>-->
<script src="./test/babel.js"></script>
<script type='text/babel'>
var s
var str = ''
class App extends React.Component {
constructor(props) {
super(props)
}
componentWillMount(){
console.log(this.a)
}
componentDidMount(){
console.log(this.a)
}
render() {
return <div ref={(dom)=>{ this.a = dom}} >
cccc
</div>
}
};
window.onload = function(){
s = ReactDOM.render( <App />, document.getElementById('example'))
}
</script>
</head>
<body>
<div>这个默认会被清掉</div>
<div id='example'></div>
</body>
</html>