Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

206
Vistas
Cannot set properties of null (setting 'image')

someone help please my image won’t load and I get a error

document.getElementById("task").image = "url"

I made sure the Id matches the id in html I don’t know what’s wrong

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You can't use image to change the image of an <img>. To do it you will need to use src. Here is what you need below.

document.getElementById("task").src = "yoururl"
about 4 years ago · Juan Pablo Isaza Denunciar

0

To change the image source, you can try the code below.

const img = document.querySelector("task");
img.setAttribute("src", "<url>");

setAttribute() will set the src attribute to your URL of your image.

Make sure to change <url> with your image URL!


You can also use the code below.

const img = document.querySelector("task");
img.src = "<url>";

Setting the source to your URL will correctly render the image.

Make sure to change <url> with your image URL!

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda