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

151
Views
How to update a main page (HTML,JavaScript)

Below this is my code main.html

<form action="#" class="signForm">
  <input type="text" placeholder="Ваш Email..." class="loginSign">
  <div class="group">
    <input name="PassSign" type="password" placeholder="Пароль" class="passSign">
    <i class="fas fa-eye show__pass"></i>
  </div>
  <div class="btn signBtn">Войти</div>
</form>
      
   

this is my code main.js

const loginSign = document.querySelector('.loginSign')
const passSign = document.querySelector('.passSign')
const signBtn = document.querySelector('.signBtn')

var login = false;
async function getUser() {
    const data = await getData()

    data.forEach((user,index)=> {
        
        if(user.login.toLowerCase() === loginSign.value.toLowerCase() & user.pass.toLowerCase() === passSign.value.toLowerCase()) {
            login = true
        }
    });

    if(login) {
        setTimeout(function(){
            successful.classList.add('active')
        },500)
        setTimeout(function(){
            successful.classList.remove('active')
        },3000)
        console.log(login)
    }
    else {
        unsuccessful.classList.add('active')
        setTimeout(function() {
            unsuccessful.classList.remove('active')
        },2000)
        console.log("err :" + login)
    }
}

The main problem is when I am uploading page and and sign in. It works. When I'm entering next username and password (wrong). It works. How to remove old username and password ?

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!