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

172
Vistas
Problems with Javascript code in html file

Code:

<!DOCTYPE html>

<head>
  <script type="text/javascript" src="jquery-3.3.1.js">
  </script>
  <script type="text/javascript">
    $(function() {
      alert("Hello World");
    });
  </script>
  <meta charset="utf-8">
  <link href="../style/Home.css">
</head>

<body>
  <input type="text" name="username" placeholder="Username" id="user" />
  <input type="password" name="password" placeholder="password" id="pass" />
  <input type="submit" id="submitButton">
</body>

The html section of the code, like the input fields works fine, but the javascript portion has not been working. Originally I had it where the javascript portion of the code was its own separate file, but I ultimately had to change that when it wasn't working. Even after I added the javascript code to the html file the code still wouldn't run, so I just did a generic alert statement to see if the problem was with the javascript code or if it was something else.

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

0

in you browse press F12 > Network > make sure Disable cache has checked

you should type alert() only

<script>
   alert();
</script>

alert will still run even if jquery is not read

about 4 years ago · Juan Pablo Isaza Denunciar

0

path to your jquery file is invalid.

<script type="text/javascript" src="jquery-3.3.1.js"> 

in src, you cannot give path like this: jquery-3.3.1.js. give proper path.

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