Raizekas

Untitled

Feb 22nd, 2021
459
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //----------------------------Pagrindine dalis--------------
  2. window.onload = function() {
  3.     var antraste = document.getElementById("antraste");
  4.     var pastraipa = document.getElementById("pastraipa");
  5. }
  6.  
  7.  
  8. //---------------------------Funkcijos----------------------
  9. function paspaudusPirma()
  10. {
  11.     antraste.innerHTML = "Pirmos užduoties tekstas";
  12. }
  13.  
  14.  
  15. function paspaudusAntra()
  16. {
  17.     pastraipa.innerHTML = "Pastraipos tekstas po antro mygtuko";
  18. }
  19.  
  20.  
  21. function paspaudusTrecia()
  22. {
  23.     antraste.innerHTML = "Abu buvo pakeisti";
  24.     pastraipa.innerHTML = "Abu buvo pakeisti";
  25. }
  26.  
  27. function paspaudusKetvirta()
  28. {
  29.     antraste.style.backgroundColor = "red";
  30. }
  31.  
  32. function paspaudusPenkta()
  33. {
  34.     pastraipa.style.color = "blue";
  35. }
  36.  
  37.  
  38. function paspaudusSesta()
  39. {
  40.     antraste.style.fontSize = "40px";
  41. }
  42.  
  43. function paspaudusSeptinta()
  44. {
  45.     pastraipa.style.display = "none";
  46.    //pastraipa.style.opacity = 0;
  47.    //pastraipa.style.visibility = "hidden";
  48.     //pastraipa.innerHTML = "";
  49. }
  50.  
  51. function paspaudusAstunta()
  52. {
  53.     pastraipa.style.border = "1px solid black";                 // "sujungiant" visus parametrus i viena
  54.  
  55.    /* JavaScript borderio pakeitimas - išskaidant borderio parametrus į tris skirtingus parametrus (dydį, stilių ir spalvą)
  56.     pastraipa.style.borderWidth = "1px";
  57.     pastraipa.style.borderStyle = "solid";
  58.     pastraipa.style.borderColor = "black";
  59.     */
  60.    
  61.     /*CSS borderio uzrasymo du budai
  62.     border: 1px solid black;
  63.  
  64.     border-width: 1px;
  65.     border-style: solid;
  66.     border-color: black;*/
  67. }
  68.  
  69. function paspaudusDevinta()
  70. {
  71.     pastraipa.style.width = "50%";
  72. }
  73.  
  74.  
  75. function paspaudusDesimta()
  76. {
  77.     antraste.style.order = 2;
  78.     pastraipa.style.order = 1;
  79.  
  80.    /* var antraste2 = document.getElementById("antraste2");
  81.     antraste2.style.display = "block";
  82.     antraste.style.display = "none";*/
  83. }
  84.  
  85.  
  86.  
RAW Paste Data