Forms 如何在React with reactstrap库中设置过账表单?
我是React和reactstrap的新手,我想知道如何设置一个表单,使用表单标签在提交时发布到发布路线。我在文档中找不到这样做的示例。所以我想找一个类似的:Forms 如何在React with reactstrap库中设置过账表单?,forms,reactjs,post,reactstrap,Forms,Reactjs,Post,Reactstrap,我是React和reactstrap的新手,我想知道如何设置一个表单,使用表单标签在提交时发布到发布路线。我在文档中找不到这样做的示例。所以我想找一个类似的: <form action='/signup/insert' method = 'POST'> <div class="form-group"> <input id ='signup' type='text' name='uid' placeholder='Username'>&l
<form action='/signup/insert' method = 'POST'>
<div class="form-group">
<input id ='signup' type='text' name='uid' placeholder='Username'><br>
<input id ='signup' type='password' name='pwd' placeholder='Password'><br>
<input id ='signup' type='text' name='email' placeholder='E-mail address'><br>
<button id = 'switch' type='submit'>Sign Up</button>
</div>
</form>
我想要这样的东西:
<Form>
<FormGroup>
<Label for="exampleEmail">Email</Label>
<Input
type="email"
name="email"
id="exampleEmail"
placeholder="noreply@noreply.com"
/>
</FormGroup>
<FormGroup>
<Label for="examplePassword">Password</Label>
<Input
type="password"
name="password"
id="examplePassword"
placeholder="password"
/>
</FormGroup>
<Button>Sign Up</Button>
</Form>
我必须在按钮标签中添加这个吗?如何做到这一点?顺便说一句,我的路线已经设置好了,所以我只需要从这里发布它。与您的示例中的方法完全相同,没有任何限制。表单组件将您提供的任何属性传递给在页面上呈现的标记,因此,如果您的后端设置为处理请求,则此代码将起作用。Jep,谢谢,我已经找到了它。免费给你奖金!