SHARE
TWEET

elo

a guest Oct 17th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.     <head>
  3.     <meta charset="utf-8"/>
  4.     </head>
  5. <body>
  6.  
  7. <table>
  8. <tr><td>
  9. <select id="sezon" style="width: 100%" >
  10. <option value="1">sezon 1 </option><option value="2">sezon 2 </option><option value="3">sezon 3 </option><option value="4">sezon 4 </option><option value="5">sezon 5 </option><option value="6">sezon 6 </option><option value="7">sezon 7 </option><option value="8">sezon 8 </option><option value="9">sezon 9 </option><option value="10">sezon 10 </option>
  11. </select>
  12. </td><td>
  13. <select id="odc" style="width: 100%" >
  14. <option value="1">odc 1 </option><option value="2">odc 2 </option><option value="3">odc 3 </option><option value="4">odc 4 </option><option value="5">odc 5 </option><option value="6">odc 6 </option><option value="7">odc 7 </option><option value="8">odc 8 </option><option value="9">odc 9 </option><option value="10">odc 10 </option>
  15. <option value="11">odc 11 </option><option value="12">odc 12 </option><option value="13">odc 13 </option><option value="14">odc 14 </option><option value="15">odc 15 </option><option value="16">odc 16 </option><option value="17">odc 17 </option><option value="18">odc 18 </option><option value="19">odc 19 </option><option value="20">odc 20 </option>
  16. <option value="21">odc 21 </option><option value="22">odc 22 </option><option value="23">odc 23 </option><option value="24">odc 24 </option><option value="25">odc 25 </option>
  17. </select></td></tr>
  18.  
  19.  
  20. <tr><td>Prędkość oglądania:</td><td> <input type="text" id="p" value="1" width="100%"></td></tr>
  21. <tr><td colspan="2"><button onclick="yo()" style="width: 100%">=</button></td></tr>
  22. <tr><td>ILE ZOSTAŁO:</td><td><input type="text" id="color" value="gowno"></td></tr>
  23. </table>
  24.  
  25. <script>
  26.  
  27. function yo() {
  28.     var x = document.getElementById("sezon").value;
  29.     var y = parseInt(document.getElementById("odc").value);
  30.     var p = parseFloat(document.getElementById("p").value);
  31.    
  32.     if(x==1)
  33.     {
  34.     color.value = ((234*22/p/60)-((y*22)/p/60)).toFixed(2)+"h";
  35.     }
  36.     else if(x==2)
  37.     {
  38.     color.value = ((234*22/p/60)-(((24+y)*22)/p/60)).toFixed(2)+"h";
  39.     }
  40.     else if(x==3)
  41.     {
  42.     color.value = ((234*22/p/60)-(((48+y)*22)/p/60)).toFixed(2)+"h";
  43.     }
  44.     else if(x==4)
  45.     {
  46.     color.value = ((234*22/p/60)-(((73+y)*22)/p/60)).toFixed(2)+"h";
  47.     }
  48.     else if(x==5)
  49.     {
  50.     color.value = ((234*22/p/60)-(((97+y)*22)/p/60)).toFixed(2)+"h";
  51.     }
  52.     else if(x==6)
  53.     {
  54.     color.value = ((234*22/p/60)-(((121+y)*22)/p/60)).toFixed(2)+"h";
  55.     }
  56.     else if(x==7)
  57.     {
  58.     color.value = ((234*22/p/60)-(((146+y)*22)/p/60)).toFixed(2)+"h";
  59.     }
  60.     else if(x==8)
  61.     {
  62.     color.value = ((234*22/p/60)-(((170+y)*22)/p/60)).toFixed(2)+"h";
  63.     }
  64.     else if(x==9)
  65.     {
  66.     color.value = ((234*22/p/60)-(((194+y)*22)/p/60)).toFixed(2)+"h";
  67.     }
  68.     else if(x==10)
  69.     {
  70.     color.value = ((234*22/p/60)-(((217+y)*22)/p/60)).toFixed(2)+"h";
  71.     }
  72. }
  73. </script>
  74.  
  75. </body>
  76. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top