Home > Web Front-end > JS Tutorial > body text

React generates unordered list

黄舟
Release: 2017-02-16 13:41:13
Original
1218 people have browsed it

1. Problem background

Use React to generate an unordered list. The list shows the four seasons of the year


2. Implementation source code

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>React之无序列表</title>
		<script type="text/javascript" src="../js/react.js" ></script>
		<script type="text/javascript" src="../js/react-dom.js" ></script>
		<script type="text/javascript" src="../js/browser.min.js" ></script>
		<script type="text/babel">
			ReactDOM.render(
				<ul>
					<li>春季</li>
					<li>夏季</li>
					<li>秋季</li>
					<li>冬季</li>
				</ul>,
				document.getElementById(&#39;ul&#39;)
			);
		</script>
	</head>
	<body>
		<p id="ul"></p>
	</body>
</html>
Copy after login


3. Implementation result

React generates unordered list

The above is the content of React generating an unordered list. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!