Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function changeTitle(){
- let heading1 = document.getElementById('title1')
- heading1.innerHTML = 'Changed Title'
- }
- function changeColorPText() {
- let paragraph = document.getElementsByTagName('p')[0]
- paragraph.style.color = 'red'
- }
- function changeColorPBg(){
- let p = document.getElementById('p1')
- p.style.background = 'aqua'
- }
- function switchText(){
- let p1 = document.getElementById('p1')
- let p2 = document.getElementById('p2')
- let temp = p1.innerHTML
- p1.innerHTML = p2.innerHTML
- p2.innerHTML = temp
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement