Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

268
Visualizações
I want to add date and time on navbar element named 'UK CT' when it is clicked
    <!doctype html>
    <html lang="en">
    <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" 
    href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
    integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" 
    crossorigin="anonymous">
    <title>Hello, world!</title>
    <script>
    let a,b;
    let date,date1;
    let time,time1;
    const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
    setInterval(() => {
    a = new Date();
    date = a.toLocaleDateString(undefined, options);
    time = a.getHours() + ':' + a.getMinutes() + ':' + a.getSeconds();
    document.getElementById('time').innerHTML = time + "<br>on " + date;
    }, 1000);
    setInterval(() => {
    const date1 = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738));
    time1=a.getHours() + ':' + a.getMinutes() + ':' + a.getSeconds();
    document.getElementByClassName('navbar-nav mr-auto nav-item active nav- 
    link').onclick="time1 + "<br>on " + date1;;";
    document.getElementById(time1).innerHTML = time1 + "<br>on " + date1;
    }, 1000);
    </script>
    </head>
    <body>
    </html>

1.I want to see the current time and date of United Kingdom . 2.So I have used a 'UK CT' as an anchor tag in navigation bar.When we click on 'UK CT' it should show the current time and date. 3.The data and time should be shown in Jumbotron template.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda