-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo1.html
More file actions
36 lines (36 loc) · 1016 Bytes
/
demo1.html
File metadata and controls
36 lines (36 loc) · 1016 Bytes
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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="js/react.min.js"></script>
<script src="js/react-dom.min.js"></script>
</head>
<body>
<div id="app" class="paa"></div>
<script>
//DOM组件
ReactDOM.render(
React.DOM.div({
id: "my-heading",
style:{
background:"#f0f0f0",
color:"#ffffff",
height:"20rem",
width:"100%",
fontSize:"5rem",
margin:"0",
padding:"0"
}
},React.DOM.span({},
React.DOM.strong({},"hello"),
React.DOM.em({
style:{
textDecoration: "underline"
}
},"world"))),
document.getElementsByClassName("paa")[0]
);
</script>
</body>
</html>