Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <script>
  2. function poka(wartosc) {
  3. var elementBody=document.body;
  4. elementBody.innerHTML+=wartosc;
  5. elementBody.innerHYML+="</br>";
  6. }
  7. function TB() {
  8. a= eval(document.form2.liczba1.value);
  9. c= a/1024;
  10. document.form2.wynik1.value = c;
  11. }
  12. function kB() {
  13. a= eval(document.form2.liczba1.value);
  14. c= a*1024*1024;
  15. document.form2.wynik2.value = c;
  16. }
  17. function B() {
  18. a= eval(document.form2.liczba1.value);
  19. c= a*1024*1024*1024;
  20. document.form2.wynik3.value = c;
  21. }
  22. </script>
  23.  
  24. </head>
  25. <body bgcolor="gray">
  26.  
  27.  
  28. <form name="form2">
  29.  
  30. <div id="dev1">GB : <input type="text" name="liczba1" id="liczba1"/> GB</br>
  31. <input type="button" value="Oblicz" onclick="TB(),kB(),B()"/></br>
  32. Odpowiedzi: </br>
  33. <input type="text" disabled name="wynik1"/>TB</br>
  34. <input type="text" disabled name="wynik2"/>kB</br>
  35. <input type="text" disabled name="wynik3"/>B</br>
  36. <input type="submit" name="wyslij"/>
  37. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement