Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. class createAcc extends Component {
  2. getInitialState() {
  3. return {
  4. username: "",
  5. email: "",
  6. password: "",
  7. }
  8. }
  9. handleUsername(e) {
  10. this.setState({username: e.target.value});
  11. }
  12.  
  13. handleEmail(e) {
  14. this.setState({email: e.target.value});
  15. }
  16.  
  17. handlePassword(e) {
  18. this.setState({password: e.target.value});
  19. }
  20. render() {
  21. return (
  22. <div className='acc'>
  23. <div className="login">
  24. <h1>welcome to cchange</h1>
  25. <form id="accCreateForm" action="Javascript=submit()">
  26. <h3>username</h3>
  27. <input type="text" id="nameBox" name = "username" placeholder="username" value={this.state.username} onChange={this.handleUsername}/>
  28. <h3>email</h3>
  29. <input type="text" id="emailBox" name = "email" placeholder="email" value={this.state.email} onChange={this.handleEmail}/>
  30. <h3>password</h3>
  31. <input type="password" id="passBox" name = "password" placeholder="password" value={this.state.password} onChange={this.handlePassword}/>
  32. <br/>
  33. <input type="submit" id="btnCreateAcc" value="submit" onClick={this.handleLogin}/>
  34. </form>
  35. </div>
  36. <div className="info">
  37. <p>
  38. Lorem ipsum dolor sit amet, consectetur adipiscing elit, <br/><br/>sed do eiusmod tempor incididunt ut <br/>
  39. labore et dolore magna aliqua. Ut enim ad minim veniam, <br/><br/>quis nostrud exercitation ullamco laboris nisi<br/><br/>
  40. ut aliquip ex ea commodo consequat. Duis aute irure dolor in <br/><br/>reprehenderit in voluptate velit esse cillum <br/><br/>
  41. dolore eu fugiat nulla pariatur. <br/>
  42. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui <br/><br/>officia deserunt mollit anim id est laborum
  43. </p>
  44. </div>
  45.  
  46. </div>
  47. );
  48. }
  49. handleLogin() {
  50. console.log("username email and password");
  51. console.log(this.state.username + " " + this.state.email + " " + this.state.password);
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement