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

191
Views
Cambiar el código javascript según el valor de entrada

Estoy haciendo un programa que oculta tu historial por lo que buscas

 function bruh() { var win = window.open(); win.document.body.style.margin = '0'; win.document.body.style.height = '100vh'; var f = win.document.createElement("iframe"); window.focus(); var url = "URLINPUT"; if (!url) return; f.style.width = "100%"; f.style.height = "100%"; f.style.border = 'none'; f.style.margin = '0'; win.document.body.appendChild(f); f.src = url }

entonces ingresan una url. y la URLINPUT cambia a lo que están tratando de buscar

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Haz de url un parámetro de función.

 function bruh(url) { if (!url) return; var win = window.open(); win.document.body.style.margin = '0'; win.document.body.style.height = '100vh'; var f = win.document.createElement("iframe"); f.style.width = "100%"; f.style.height = "100%"; f.style.border = 'none'; f.style.margin = '0'; win.document.body.appendChild(f); f.src = url }

Entonces su campo de búsqueda puede ser algo como:

 <input id="search" onchange="bruh(this.value)">
about 4 years ago · Juan Pablo Isaza Report

0

Puede usar parámetros en su función.

 function bruh(url) { var win = window.open(); win.document.body.style.margin = '0'; win.document.body.style.height = '100vh'; var f = win.document.createElement("iframe"); window.focus(); // url is already declared in function if (!url) return; f.style.width = "100%"; f.style.height = "100%"; f.style.border = 'none'; f.style.margin = '0'; win.document.body.appendChild(f); f.src = url }
 <html> <body> <form> <input type="text" id="text" placeholder="Please type a URL!" onchange="bruh(this.value);" value="Please type a URL!"> </form> </body> </html>

Esto ejecutará la función cuando la entrada cambie con el valor de la entrada de texto.

Más información está en MDN

about 4 years ago · Juan Pablo Isaza 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!