1234567891011121314151617181920 |
- // confirm: if this days
- // Сделать тоже самое с помощью if.
- const f5 = (rootId) => {
- const task05block = document.createElement('div');
- const task05title = document.createElement('h2');
- task05title.innerText = 'Task-05 Confirm: if this days';
- const talk05Btn = document.createElement('button');
- talk05Btn.innerText = "Lets talk again";
- talk05Btn.style = 'margin-bottom:20px';
- rootId.appendChild(task05block);
- task05block.appendChild(task05title);
- task05block.appendChild(talk05Btn);
- talk05Btn.onclick = () => {
- if (!confirm('Шоппинг?')) { alert("ты - бяка") }
- }
- }
- f5(root);
- export default f5;
|