-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
59 lines (38 loc) · 1.44 KB
/
index.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
50
51
52
53
54
55
56
57
58
59
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="react.development.js" ></script>
<script src="react-dom.development.js" ></script>
<script src="babel.min.js" ></script>
</head>
<body>
<div id="root">
</div>
<script type="text/babel">
// const first = React.createElement('div',{},"This is first div");
// const li1 = React.createElement('li',{},"This is the first");
// const li2 = React.createElement('li',{},"This is the second");
// const ol = React.createElement('ol',{
// className:'xx',
// style:{
// backgroundColor:'blue',
// color:'white'
// }
// },li1,li2);
//JSX
//React.createElement('div',{},"This is first div");
const li1 = <li>This is the first</li>
const li2 = <li>This {gets() + asd} second</li>
const ol = <ol style={{backgroundColor:'blue',color:'white'}} >
{li1}
</ol>
//class
//function
ReactDOM.render(ol,document.getElementById('root'));
</script>
</body>
</html>