daily pastebin goal
46%
SHARE
TWEET

123123

a guest Mar 25th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <script type="text/javascript">
  5.  
  6. function zwierzeta(w1,w2,w3,w4){
  7. this.pies =w1;
  8. this.kot = w2;
  9. this.szczur = w3;
  10. this.kret = w4;
  11.  
  12. this.pokaz = function()
  13. {
  14.  
  15.  
  16. var tablica_1=[]
  17. tablica_1[0]=[w1];
  18. tablica_1[1]=[w2];
  19. tablica_1[2]=[w3];
  20. tablica_1[3]=[w4];
  21. document.write('Pierwszy element tablicy:'+tablica_1[0][0]+"<br>");
  22. document.write('Drugi element tablicy:'+tablica_1[1][0]+"<br>");
  23. document.write('Trzeci element tablicy:'+tablica_1[2][0]+"<br>");
  24. document.write('Czwarty element tablicy:'+tablica_1[3][0]+"<br>");
  25. }
  26. }
  27. function stw1()
  28. {
  29. a=document.getElementById("a1").value;
  30. b=document.getElementById("a2").value;
  31. c=document.getElementById("a3").value;
  32. d=document.getElementById("a4").value;
  33. zwierzeta = new zwierzeta(a,b,c,d);
  34. zwierzeta.pokaz();
  35. }
  36.  
  37. </script>
  38. </head>
  39. <body>
  40.  
  41. <input type = "text" id="a1"/>
  42. <input type = "text" id="a2"/>
  43. <input type = "text" id="a3"/>
  44. <input type = "text" id="a4"/>
  45. <input type = "submit" value= "Pokaz" onclick = "stw1()"/>
  46.  
  47.  
  48. <div id ="wynik" ></div>
  49. </body>
  50. </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