Guest User

Untitled

a guest
May 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    var vytvoreno=0 ;
  2.    
  3.    function zmen(){
  4.        
  5.        
  6.         var pole = document.createElement("div");
  7.  
  8.        pole.style.width="200px";
  9.        pole.style.height="200px";
  10.        pole.style.background="black";
  11.        document.body.appendChild(pole);
  12.        
  13.        
  14.        var divy =
  15.            
  16.            "<div style='height:50px;width:50px;background:aqua;float:left'onclick='pole1()'></div>" +
  17.               "<div style='height:50px;width:50px;background:green;float:left'onclick='pole2()'></div>" +
  18.                 "<div style='height:50px;width:50px;background:red;float:left'onclick='pole3()'></div>" +
  19.                   "<div style='height:50px;width:50px;background:grey;float:left'onclick='pole4()'></div>"
  20.  pole.innerHTML = divy;
  21.        
  22.        
  23.        if (vytvoreno==O){  
  24.             zmen()      
  25.                         }  
  26. else
  27. {
  28.        alert(uz je vytvoren );
  29. }
  30.        
  31.     }
Add Comment
Please, Sign In to add comment