import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.handleFormSubmit = this.handleFormSubmit.bind(this)
this.handlechange = this.handlechange.bind(this)
}
handleFormSubmit(event) {
event.preventDefault();
}
handlechange(event){
this.setState({Username : event.target.value})
}
render() {
return (
<div className="App">
<div>Login Page</div>
<form onSubmit={this.handleFormSubmit}>
<div>
<label>
Username:
<input type="text" name="Username" onChange={this.handlechange}/>
</label>
</div>
<div>
<label>
Password:
<input type="text" name="password" />
</label>
</div>
<button className="btn btn-dark outage-btn">
Submit
</button>
</form>
</div>
);
}
}
export default App;
import logo from './logo.svg';
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.handleFormSubmit = this.handleFormSubmit.bind(this)
this.handlechange = this.handlechange.bind(this)
}
handleFormSubmit(event) {
event.preventDefault();
}
handlechange(event){
this.setState({Username : event.target.value})
}
render() {
return (
<div className="App">
<div>Login Page</div>
<form onSubmit={this.handleFormSubmit}>
<div>
<label>
Username:
<input type="text" name="Username" onChange={this.handlechange}/>
</label>
</div>
<div>
<label>
Password:
<input type="text" name="password" />
</label>
</div>
<button className="btn btn-dark outage-btn">
Submit
</button>
</form>
</div>
);
}
}
export default App;
No comments:
Post a Comment