Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function myfunction(){
- let czynnosc = document.getElementById('czynnosc').value;
- let czas = document.getElementById('czas').value;
- let teraz = new Date();
- let stworzdiv = document.createElement('div');
- let stworzp = document.createElement('p');
- let stworza = document.createElement('a');
- let zmienna = stworzdiv.appendChild(stworza).appendChild(stworzp);
- let elementy = document.getElementById('elementy');
- if(!czynnosc||!czas){
- alert('Wypełnij pola!');
- }else{
- elementy.appendChild(stworzdiv);
- stworzdiv.className="kafelka";
- // stworzdiv.appendChild(stworzp).className = 'czynnosc';
- // stworzdiv.appendChild(stworzp).className = 'czas';
- zmienna;
- // stworzdiv.firstChild.appendChild(stworzp).textContent = czynnosc;
- // stworzdiv.firstChild.appendChild(stworzp).textContent = czynnosc;
- console.log(zmienna);
- console.log(stworzdiv);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement