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

127
Views
Refreshing the clock on the page

I created a clock in Javascript, but I would like it to refresh automatically. I added a line: setInterval (data_czas, 1000); but if I gave it, the clock was automatically refreshed, but everything on my side disappeared and the clock itself was left, where every now and then there was a line with a new, refreshed date. Please help.

> <script>
function data_czas() {
    var miesiace = ["Stycznia","Lutego","Marca","Kwietnia","Maja","Czerwca","Lipca","Sierpnia","Września","Października","Listopada","Grudnia"];
    var dni = ["Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"];
    var data = new Date();
    var rok = data.getFullYear();
    var miesiac = data.getMonth();
    var tydzien = data.getDate();
    var dzien = data.getDay();
    var godzina = data.getHours();
    var minuta = data.getMinutes();
    var sekunda = data.getSeconds();
    if (minuta < 10) {
    minuta = "0" + minuta;
    }
    if (sekunda < 10) {
    sekunda = "0" + sekunda;
    }
    var p_data_czas = dni[dzien] + ", " + tydzien + " " + miesiace[miesiac] + " " + rok + " roku <br>" + "Godzina: " + godzina + ":" + minuta + ":" + sekunda
    document.write(p_data_czas);
    }
    document.write("<b> Dzisiaj jest: <Br>");
    data_czas();
    document.write("</b>")
</script>
</b>
about 4 years ago · Juan Pablo Isaza
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!