screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> /* Add your styles here if needed */ .highlighted { background-color: yellow; padding: 10px; margin: 10px; } </style> </head> <body> <div class="yourClassName">Element 1</div> <div class="yourClassName">Element 2</div> <div class="yourClassName">Element 3</div> <script> // Get all elements with a specific class var elements = document.getElementsByClassName('yourClassName'); // Iterate through the NodeList and perform actions for (var i = 0; i < elements.length; i++) { // Do something with each element, for example, add a class elements[i].classList.add('highlighted'); } </script> </body> </html>