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

200
Views
¿Cómo obtener el contenido del artículo al hacer clic en la opción?

Estoy trabajando con MVC, usando RSS para obtener información de wired.com. Pero necesito que cuando presione las opciones, quiero que el contenido aparezca en la parte inferior. pero no podía ir más lejos que eso. ¿Cómo puedo hacer esto?

 <body> <div id="news"></div> <script> fetch("https://www.wired.com/feed/rss") .then(response => response.text()) .then(str => new DOMParser().parseFromString(str, "text/xml")) .then(data => { console.log('data', data); const items = data.querySelectorAll("item"); console.log('items', items); let html = ''; html += `<select onchange="showDescription(event)">`; items.forEach(el => { let title = el.querySelector("title").innerHTML.replace("<![CDATA[", "").replace("]]>", ""); const description = el.querySelector("description").innerHTML.replace("<![CDATA[", "").replace("]]>", ""); html += `<option value="">${title}</option>`; }); html += `</select>`; document.getElementById("news").innerHTML = html; }) </script> </body>

Después de ejecutar el código anterior, obtengo lo siguiente: ingrese la descripción de la imagen aquí

Quiero este : ingrese la descripción de la imagen aquí

Gracias por ayudar.

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!