Home >Web Front-end >JS Tutorial >React generates ordered list
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('ol') ); </script> </head> <body> <p id="ol"> </p> </body> </html>
3. Implementation result
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)!