Skip to main content

ExtraPractical : Create one webpage with use of given javascript funtions 1.getElementBytagName() 2.getElementById() 3.getElementByClassName 4.querySelectorAll() 5.getAttribute().

This is Webpage for use of different Javascript function
1.getElementBytagName() 
2.getElementById() 
3.getElementByClassName 
4.querySelectorAll() 
5.getAttribute().

1.getElementBytagName(): When press on getElebyTagName button then <tr> select and change background of all <tr> tags with box-shadow.

2.getElementById(): When press on getElebyId button then given id select and show alert box and change background of a tags which has given id with box-shadow.

3.getElementByClassName(): When press on getElebyClassName button then a tag with given class name select and change background of all tags with box-shadow.

4.querySelector(): When press on querySelectorAll button then a tag with given selector name select and change background of all tag.

5.getAttribute(): When press on getAttribute button then a tag with given attribute of particular tag name select and shows alert.

Screenshots:




Comments