Created
January 21, 2020 03:24
-
-
Save potikanond/9da6fbd970ee6818b1ca8ac02f3a7014 to your computer and use it in GitHub Desktop.
JavaScript - Weight Converter App (HTML template)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" | |
| integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
| <style> | |
| body { | |
| margin-top: 70px; | |
| background: #333; | |
| color: #fff; | |
| } | |
| </style> | |
| <title>Weight Converter</title> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-6 offset-md-3"> | |
| <h1 class="display-4 text-center mb-4">Weight Converter</h1> | |
| <form action=""> | |
| <div class="form-group"> | |
| <input type="number" id="lbsInput" class="form-control form-control-lg" placeholder="Enter Pounds..."> | |
| </div> | |
| </form> | |
| <div id="output"> | |
| <div class="card bg-primary mb-2"> | |
| <div class="card-body"> | |
| <h4>Grams:</h4> | |
| <div id="gramsOutput"></div> | |
| </div> | |
| </div> | |
| <div class="card bg-success mb-2"> | |
| <div class="card-body"> | |
| <h4>Kilograms:</h4> | |
| <div id="kgOutput"></div> | |
| </div> | |
| </div> | |
| <div class="card bg-danger mb-2"> | |
| <div class="card-body"> | |
| <h4>Ounces:</h4> | |
| <div id="ozOutput"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script src="main.js"></script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment