Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Rifqi Taufiqul Hakim </title>
- </head>
- <style>
- ul{ list-style-type:none;
- padding:0;
- margin:-15px -15 25px -8px;
- border-left:6px solid #00ffb7;
- top: 0;
- overflow: hidden;
- background-color:#333; }
- li{ float:left; }
- li a{ text-decoration: none;
- color:white;
- text-align:center;
- padding:14px 14px;
- display:block;
- font-family:lato, calibri, arial; }
- li a:hover:not(.active){ background-color:#000; }
- .active{ background-color:#1bc696; }
- fieldset{ margin:auto;
- width:450px;
- border-left:6px solid #1bc696;
- background-color:#333; }
- #choose, #showing, th, h2, td{ color:white; font-family:lato, calibri, arial; }
- </style>
- <script>
- function Hitung()
- {
- var tinggi = document.getElementById('tinggii').value;
- var berat = document.getElementById('beratt').value;
- var hasil = parseFloat(berat) / ((parseFloat(tinggi) / 100) * (parseFloat(tinggi) / 100));
- document.getElementById('hasill').value=parseFloat(hasil).toFixed(2);
- document.formmain.submit();
- }
- </script>
- <body>
- <ul>
- <li><a href="array.html">Array </a></li>
- <li><a class="active" href="Berat Badan.html">Berat Badan </a></li>
- <li><a href="#tugas3">Tugas 3 </a></li>
- </ul>
- <fieldset>
- <form>
- <h2 align="center">Kalkulator Berat Badan Ideal</h2>
- <table >
- <tr>
- <th>Tinggi Badan:</th>
- <td><input id="tinggii" type="text" maxlength="3" name="tinggi" size="10" /> CM</td>
- </tr>
- <tr>
- <th>Berat Badan:</th>
- <td><input id="beratt" type="text" maxlength="3" name="berat" size="10" /> KG</td>
- </tr
- ><tr>
- <th></th>
- <td><input type="button" name="hitungg" value="Hitung" onClick='Hitung();'/></td>
- <tr>
- <th >Result Here :</th>
- <td>
- <form>
- <input style="background-color:#1a6b06; color: #fff;font-weight: bold;text-align: center;" id='hasill' Value="0" size="10" name='ans' disabled/>
- <br />
- </form></td>
- </tr>
- <table>
- </form>
- </div>
- </tr>
- </fieldset>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement