Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const header = document.getElementById('header')
- // header.innerHTML = 'New Title'
- header.style.color = 'red';
- header.style.fontSize = '24px';
- const paragraphs = document.getElementsByTagName('p');
- console.log(paragraphs)
- const highlightedElements = document.getElementsByClassName('highlight')
- console.log(highlightedElements)
- // const firstParagraph = document.querySelector('p')
- // const allParagraphs = document.querySelectorAll('p')
- const list = document.getElementById('list')
- const newElement1 = document.createElement('li')
- newElement1.textContent = 'new element'
- newElement2 = document.createElement('li')
- newElement2.textContent = 'prepend element'
- list.appendChild(newElement1);
- list.prepend(newElement2)
- // const firstItem = list.firstElementChild
- // list.removeChild(firstItem)
- console.log(window.innerHeight)
- console.log(window.innerWidth)
- // window.alert('Attention')
- // window.open("https://stackoverflow.com/questions/2007357/how-to-set-dom-element-as-first-child", "New Window", "width=500, height=500")
- console.log(navigator.appVersion)
- console.log(`screen width - ${screen.width}`)
- console.log(`screen height - ${screen.height}`)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement