Horje
find all images without alternate text Code Example
find all images without alternate text
// find all images without alternate text and give them a red border
function processImages() {
  // Get all images
  const images = document.querySelectorAll('img')

  // Loop through all images
  images.forEach(image =>
    // If the image has no alt attribute give it a red border
    !image.alt ? (image.style.border = '1px solid red') : null
  )
}




Javascript

Related
check length of number javascript Code Example check length of number javascript Code Example
javascript init an array to 0 Code Example javascript init an array to 0 Code Example
how to add onclick event in javascript Code Example how to add onclick event in javascript Code Example
noConflict jquery Code Example noConflict jquery Code Example
javascript initiate array all zero Code Example javascript initiate array all zero Code Example

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