javascript - React Semantic UI Form,提交表单后不向用户提供保存密码
问题描述
我正在使用 React Semantic UI,并且我有简单的注册表单。我希望浏览器在用户Do you want to save password for this website?
提交表单后询问用户,因为现在当我发送表单时,它只会执行我的操作,并且在处理完请求之后就是这样。我试图标记自动完成等。没有任何帮助。我该如何解决?谢谢。sendLoginRequest
sendLoginRequest = () => {
...
}
render() {
return (
<Fragment>
<Form onSubmit={this.sendLoginRequest}>
<Form.Input
required
label="Name"
type="text"
placeholder="Name"
name="name"
onChange={this.handleChange}
{...this.state.errors.name}
/>
<Form.Input
required
label="Email"
type="email"
placeholder="Email"
name="email"
onChange={this.handleChange}
{...this.state.errors.email}
/>
<Form.Input
required
label="Password"
type="password"
placeholder="Password"
autoComplete="new-password"
name="password"
onChange={this.handleChange}
{...this.state.errors.password}
/>
<Form.Input
autoComplete="new-password"
required
label="Repeat Password"
type="password"
placeholder="Again Password"
name="repeatPassword"
onChange={this.handleChange}
{...this.state.errors.repeatPassword}
/>
<Button type='submit'>Submit</Button>
</Form>
<Spinner visible={this.state.spinner} />
</Fragment>
)
}
解决方案
推荐阅读
- javascript - 预期的服务器 HTML 包含匹配项在服务器端渲染
- python - Pandas:移动窗口的累积和(前后行)
- spring-boot - 为什么微服务接受请求事件,尽管它在尤里卡服务器注册表中关闭?
- css - ASP.NET Core 部署 css
- java - Photoview - 我想在放大后获得相对的 x 和 y 坐标
- sql - 加入两个不同的表
- node.js - 在 AWS Lambda / Pulumi 中等待 http 请求
- javafx - 等价于 ObservableMap 范围内的 LinkedHashMap
- ssas - 使用 ADOM 库将 MDX 查询结果导出到 CSV 文件
- machine-learning - 更快地修改损失函数 rcnn 检测器