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

150
Views
cómo insertar texto de una matriz como innerHtml
let arr=[<b>hari</b>,<b>gc</b>] let newarr=arr.join(" ") let textnode=document.createTextNode(newarr) let al = document.getElementById("neww"); $(textnode).insertBefore(al);

salida esperada: hari gc

lo que obtengo como salida:

 <b>hari</b> <b>gc</b>

Intenté usar parse de npm HTML react parse... pero da como resultado un error

por favor ayuda..

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

0

Puedes escribirlo peligrosamente a través de SetInnerHTML así

 <div dangerouslySetInnerHTML={{ __html: yourHtmlString }} />
about 4 years ago · Juan Pablo Isaza Report

0

 let arr = ['<b>hari</b>', '<b>gc</b>'] let newarr = arr.join(" ") let block = document.querySelector(".block"); block.innerHTML = newarr
 <div class="block"></div>

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!