标签:.com lang ntb word title dem dom src meta
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="https://cdn.bootcss.com/react/15.4.2/react.min.js"></script> <script src="https://cdn.bootcss.com/react/15.4.2/react-dom.min.js"></script> <script src="https://cdn.bootcss.com/babel-standalone/6.22.1/babel.min.js"></script> </head> <body> <div id="react3"></div> <script type="text/babel"> var word=[ <h1>我是第一句话</h1>, <h2>我是第二句话</h2>, <h3>我是第三句话</h3> ]; ReactDOM.render( <div>{word}</div>, document.getElementById("react3") ); </script> </body> </html>
{}内可以直接输出变量
标签:.com lang ntb word title dem dom src meta
原文地址:http://www.cnblogs.com/LLMjiayou7/p/7364402.html