Files
react/B/1/P01_1.html
T

45 lines
1.1 KiB
HTML
Raw Normal View History

2022-01-11 00:41:47 +08:00
<!--
* @Author: chenxuan
* @Date: 2021-12-23 21:52:33
2022-01-11 15:42:13 +08:00
* @LastEditTime: 2022-01-11 15:20:32
2022-01-11 00:41:47 +08:00
* @LastEditors: chenxuan
-->
2021-02-06 23:26:34 +08:00
<!DOCTYPE html>
2022-01-11 00:41:47 +08:00
<html>
2021-02-06 23:26:34 +08:00
<head>
2022-01-11 00:41:47 +08:00
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>绑定内联样式</title>
<script src="../package/old/react.development.js"></script>
2022-01-11 15:42:13 +08:00
<script src="../package/old/react-dom.development.js"></script>
<script src="../package/old/babel.min.js"></script>
2022-01-11 00:41:47 +08:00
<style type="text/css">
.haha{
color: red;
}
</style>
2021-02-06 23:26:34 +08:00
</head>
2022-01-11 00:41:47 +08:00
<body>
2021-02-06 23:26:34 +08:00
<div id="app">
<script type="text/babel">
let j=100,k=200;
var style1={
color:'red',
fontSize:'20px',
fontWeight:'bold'
};
ReactDOM.render(
<ul>
<li>j:{j}</li>
<li>k:{k}</li>
<li style={style1}>j+k:{j+k}</li>
<li>j是否大于k:{
(j>k) ? "是" :"否"
}</li>
</ul>
,document.getElementById('app')
)
</script>
</div>
</body>
2022-01-11 00:41:47 +08:00
</html>