Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.07 KB | None | 0 0
  1. <html>
  2. <head>
  3.     <title> Rifqi Taufiqul Hakim </title>
  4. </head>
  5. <style>
  6. ul{     list-style-type:none;
  7.     padding:0;
  8.     margin:-15px -15 25px -8px;
  9.     border-left:6px solid #00ffb7;
  10.     top: 0;
  11.     overflow: hidden;
  12.     background-color:#333;  }
  13.  
  14. li{ float:left; }
  15.  
  16. li a{   text-decoration: none;
  17.     color:white;
  18.     text-align:center;
  19.     padding:14px 14px;
  20.     display:block;
  21.     font-family:lato, calibri, arial; }
  22.  
  23. li a:hover:not(.active){ background-color:#000; }
  24.  
  25.  
  26. .active{ background-color:#1bc696; }
  27.  
  28. fieldset{ margin:auto;
  29.       width:450px;
  30.       border-left:6px solid #1bc696;
  31.       background-color:#333; }
  32.  
  33. #choose, #showing, th, h2, td{ color:white; font-family:lato, calibri, arial; }
  34.  
  35. </style>
  36.                                                                                                                                                                    
  37. <script>
  38. function Hitung()
  39. {
  40.   var tinggi = document.getElementById('tinggii').value;
  41.   var berat = document.getElementById('beratt').value;
  42.   var hasil = parseFloat(berat) / ((parseFloat(tinggi) / 100) * (parseFloat(tinggi) / 100));
  43.    document.getElementById('hasill').value=parseFloat(hasil).toFixed(2);
  44.   document.formmain.submit();
  45. }
  46.  
  47. </script>                                                                                                                                                                                                                                                                                                                                                                                                                  
  48.  
  49. <body>
  50. <ul>
  51.     <li><a href="array.html">Array </a></li>
  52.     <li><a class="active" href="Berat Badan.html">Berat Badan </a></li>
  53.     <li><a href="#tugas3">Tugas 3 </a></li>
  54.  
  55. </ul>
  56.  
  57. <fieldset>
  58. <form>
  59. <h2 align="center">Kalkulator Berat Badan Ideal</h2>
  60. <table >
  61. <tr>
  62. <th>Tinggi Badan:</th>
  63. <td><input id="tinggii"  type="text" maxlength="3"  name="tinggi" size="10" /> CM</td>
  64. </tr>
  65. <tr>
  66. <th>Berat Badan:</th>
  67. <td><input id="beratt" type="text" maxlength="3"  name="berat"  size="10" /> KG</td>
  68. </tr
  69. ><tr>
  70. <th></th>
  71. <td><input type="button" name="hitungg" value="Hitung" onClick='Hitung();'/></td>
  72. <tr>
  73. <th >Result Here :</th>
  74. <td>
  75. <form>
  76. <input style="background-color:#1a6b06; color: #fff;font-weight: bold;text-align: center;"  id='hasill' Value="0" size="10" name='ans' disabled/>
  77. <br />
  78. </form></td>
  79. </tr>
  80. <table>
  81. </form>
  82. </div>
  83. </tr>
  84.  
  85. </fieldset>
  86.  
  87.  
  88. </body>
  89. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement