<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>实名认证</title>
<link rel="stylesheet" href="css/jquery.mobile.min.css" />
<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/react-with-addons.js"></script>
</head>
<body>
<div id="uimain">
</div>
<script type="text/babel">
var Shmyzform = React.createClass({
render:function (){
return <h1>hello</h1>
}
});
ReactDOM.render(
<Shmyzform />,
document.getElementById('uimain')
);
</script>
</body>
</html>
请问这段代码那里写错了呢,既不报错也不显示内容,,还请指教
把
<script type="text/babel">
改成<script type="text/jsx">
在引入一个
<script src="react-0.13.2/build/JSXTransformer.js"></script>
就可以看