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

92
Views
location.href = 'URL' redirige a una nueva página, no a un nuevo sitio web

Estoy tratando de hacer un proyecto que implica redirigir a otro sitio web. Tengo problemas para hacer eso.

Aquí está mi código

 document.getElementById("ContinueToWeb").onclick = function () { location.href = "google.com"; }
 <html> <head> <!--Some code here--> </head> <body> <!--Some code here--> <button id="ContinueToWeb">Continue</button> </body> </html>

Por alguna razón, se redirige de c:/folder/index.html a c:/folder/google.com aunque le digo que vaya de c:/folder/index.html a google.com . ¿Sabes lo que está pasando?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Debe agregar el protocolo para el enlace o, de lo contrario, el valor predeterminado es el que usa el sitio, que es su sistema de archivos local. Use https://www.google.com en su lugar

about 4 years ago · Santiago Trujillo Report
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!