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

95
Views
Cómo incrustar video usando la etiqueta de entrada

Quiero incrustar el video de YouTube por iframe usando la etiqueta de entrada.

Pero no funciona, ¿dónde está el error? **La URL ingresada es:- ** https://www.youtube.com/embed/G20AHZc_sfM

Código en la etiqueta del cuerpo: -

 <input id="url" type="url" placeholder="Video url"> <button onclick="emb()">Embed video</button> <div id="link"></div>

Código en script: -

 function emb(){ var iframe, urrl; var link= document.getElementById('url') iframe= document.querySelector("#link"); urrl = `<center><iframe width="480" height="360" src="${link}"></iframe></center>` iframe.innerHTML = urrl; }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No puede obtener el valor de una entrada simplemente seleccionándola. Use la propiedad de value en el enlace:

 var link = document.getElementById('url').value;
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!