Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!