Home >Web Front-end >JS Tutorial >React generates ordered list

React generates ordered list

黄舟
黄舟Original
2017-02-16 13:42:321210browse

1. Problem background

Use React to generate an ordered list and arrange it in order


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(
				<ol>
					<li>第一步</li>
					<li>第二步</li>
					<li>第三步</li>
					<li>第四步</li>
					<li>第五步</li>
					<li>第六步</li>
				</ol>,
				document.getElementById(&#39;ol&#39;)
			);
		</script>
	</head>
	<body>
		<p id="ol">
			
		</p>
	</body>
</html>


3. Implementation result

React generates ordered list

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


Statement:
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