Horje
JavaScript querySelector - By Tag name Code Example
JavaScript querySelector - By Tag name
<div>This is a div element.</div>
<div>This is a div element.</div>

<button onclick="getElement()">Get element by tag name</button>

<script>
  function getElement() {
    let element = document.querySelector("div");
    element.style.background = "lightgreen";
  }
</script>




Javascript

Related
new date in interpolation angular Code Example new date in interpolation angular Code Example
H.C.F Calculation Program Code Example H.C.F Calculation Program Code Example
how to jump one page to another on specific tab elementor Code Example how to jump one page to another on specific tab elementor Code Example
retore react app Code Example retore react app Code Example
js startswitch Code Example js startswitch Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7