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

319
Vistas
onload function not working on paragraph in JavaScript

So the error is the paragraph is not changing while we load the page.

Here is the code, I have added the JavaScript in the head itself. I even tried using external JavaScript too but that didn't work either. I used the onload function of JavaScript to change my inner HTML of paragraph, but it did not work.

<html>
<head>
  <script type="text/JavaScript">
    function fun_name() {
      alert("Working");
      document.getElementById("para").innerHTML = "After Loading"
    }
  </script>
</head>
<body>
  <p onload="fun_name();" id="para">Before Loading</p>
</body>
</html>
about 4 years ago · Juan Pablo Isaza
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