<script type="text/babel">
var divReact = document.getElementById('id-div-react');
function FormTitle(){
return <h4>User Loginh4>;
}
function UserId(){
const UserId = (
<p>User Id(*):<input type="text"/>p>
);
return UserId;
}
function UserName(){
const UserName =(
<p>User Name: <input type="text"/>p>
);
return UserName;
}
function Password() {
const passwd = (
<p>Password(*): <input type="text"/>p>
)
return Passwd;
}
function Submit(){
const submit = (
<p><button>Loginbutton>p>
);
return Submit;
}
function FormLogin() {
return (
<div id="id-div-formlogin">
<FormTitle/>
<UserId/>
<UserName/>
<Password/>
<Submit/>
div>
);
}
const formLogin = <FormLogin/>;
const reactSpan = (
<span>
<h3>bobh3>
{formLogin}
span>
);
ReactDOM.render(reactSpan, divReact);
script>
 ``` 筛选器 默认级别 日2 top react-dom.development.js:25129 Download the React DevToo1s fora better development experience: htt s://fb.me/react-devtoo1s ADYou are using the in-browser E Babel transformer. babel.min.js:12 6 Be suretoprecompileyour scriptsforproduction https://babeljs.io/docs/setup/ 8 Uncaught Error:Target container is react-dom.development.js:24963 O not a DOM element atObject.render(react-dom.development-js:24963:15) at:32:10 atn(babel.min.is:12:27049) atr(babel.min.js:12:27558) ato(babel.min.js:12:27966) atu(babel.min.js:12:28332) atE(babel.min.js:1:6138) 2 ```返回的 Passwd 和 Submit 都是大写的 但是定义是小写
不知道你这个问题是否已经解决, 如果还没有解决的话:There are multiple ways to make components communicate. 有多种方法可以使组件进行通信。 Some can be suited to your usecase. 有些可以适合您的用例。 Here is a list of some I've found useful to know. 这是我发现有用的一些清单。