I would like to put on my website a clock with the time in real time in Barcelona. I've gotten some code inside a text box to work (without using CSS), but it only shows the hour/minutes/seconds at the moment you enter the page, and the seconds don't advance. I have seen that there is code to refresh the seconds every second, but I don't know how to integrate it in my code to make it work. Thank you very much
<p style="text-align: left;”>:BARCELONA<span id="datetime"></span><script>
var dt = new Date(); document.getElementById("datetime").innerHTML = (("0"+dt.getHours()).slice(-2)) +":"+ (("0"+dt.getMinutes()).slice(-2)) +":"+ (("0"+dt.getSeconds()).slice(-2));
</script></p>