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

139
Views
¿Enlazar dos sitios web con la propiedad onclick?

Tengo una página de inicio de sesión y una página de contenido. Al presionar el botón de inicio de sesión se abrirá la página de contenido en una nueva pestaña, pero quiero que se abra en la misma pestaña. Intenté window.location.href pero no funciona por alguna razón.

 function validate() { var username = document.getElementById("username").value; var password = document.getElementById("password").value; if (username == "marin" && password == "12345678") { window.open("file:///C:/Users/lukam/OneDrive/Radna%20povr%C5%A1ina/stranica/stranica1_1.html") return false; } else { alert("login je pogresan") } }
 <div> <label for="Username">Username</label> <input type="text" name="Username" id="username"> </div> <div> <label for="password">Password</label> <input type="password" name="password" id="password"> </div> <button type="submit" class="btn-submit" onclick="validate()">Login</button>

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!