-
千万里不及你
orm.jsvar React = require('react');var ReactDOM = require('react-dom');var {Form, Input} = require('react-form');var {Password, Text} = require('react-form-inputs');var LoginForm = React.createClass({render() {return (<div><Form {...this.props} for="user"><h1>Login</h1><Input type={Text} for="username" placeholder="Username" /><Input type={Password} for="password" placeholder="Password" /><input type="submit" value="Login" /></Form></div>
-
POPMUISE
form表单提交一定会跳转页面,通常的做法是利用frame框架进行,达到异步提交的效果
-
杨__羊羊
问题并么有解决 , 使用不同的name值 ,并没有实现单选按钮的效果 ,三个按钮仍然能同时选中const SexRadio=React.createClass({getInitialState:function(){return {}},render:function(){return (<div><form name="form1"><input type="radio" name="radiobutton1" value="radiobutton" checked /> 喜欢<input type="radio" name="radiobutton2" value="radiobutton" /> 不喜欢<input type="radio" name="radiobutton3" value="radiobutton"/> 无所谓<br/></form></div>);}});ReactDOM.render(<SexRadio/>,document.getEl