【发布时间】:2019-04-20 14:44:36
【问题描述】:
当我在 Google Chrome。 当我尝试在 Firefox 上编译代码时,一切正常。
我想问一个问题:如何在谷歌浏览器上修复这个错误?为什么只在 Google Chrome 上显示此错误?
这是我的代码:
import React from "react";
import {
Container, Col, Form,
FormGroup, Label, Input,
Button,
} from 'reactstrap';
export default class Register extends React.Component{
render() {
return (
<div>
<Container>
<h2>Sign In</h2>
<Form>
<Col>
<FormGroup>
<Label>Email</Label>
<Input
type="email"
name="email"
id="exampleEmail"
placeholder="myemail@email.com"
autocomplete = "email"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="PhoneNumber">Phone Number</Label>
<Input
type="Phone Number"
name="Phone Number"
id="exampleNumber"
placeholder="37060289225"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="RepeatPassword">Repeat Password</Label>
<Input
type="password"
name="Repeat Password"
id="RepeatPassword"
placeholder="********"
autocomplete="new-password"
/>
</FormGroup>
</Col>
<Col>
<FormGroup>
<Label for="examplePassword">Password</Label>
<Input
type="password"
name="password"
id="examplePassword"
placeholder="********"
autocomplete = "new-password"
/>
</FormGroup>
</Col>
<Button>Submit</Button>
</Form>
</Container>
</div>
);
}
}
【问题讨论】:
-
JSX 与 HTML 并不完全相同。
autoComplete是正确的。
标签: reactjs google-chrome