Output temp of a city on a internal web page w/ javascript.

  • 1
  • Question
  • Updated 6 years ago
Hello, I'm looking to use JavaScript to print the temp on a website. the code example you have opens a box and you have to click ok. I just want it to read "The current Temp is:" right in the page.
Photo of dennisman80


  • 2 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of afelicioni


  • 227 Posts
  • 43 Reply Likes
Following the example, you could alter jQuery code like

$("body").append("Current temperature in " + location + " is: " + temp_f);

See http://api.jquery.com/append/ for further reference or try googling "jquery tutorial" for focusing over and leverage your javascript skills!