Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

139
Visualizações
Use fetch or axios to display html content of another page running the scripts

I want to use fetch or axios to download a html content of a page, this works fine but the javascript code inside the page does not run

here is what i've tried

document.getElementById('test').innerHTML=
await (await fetch('url')).text()

what i want is similar to this answer, but i want to get the page with the javascript inside processed instead of running a script.

Can I run a JS script from another using `fetch`?


My goal is to create a boostrapEmail template that i can send parameters and make it dynamic, using localstorage

https://bootstrapemail.com/docs/introduction

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I found a way to do it here:
https://stackoverflow.com/a/3714367/2085104

<style onload="alert('test');"/>

credits to the author


A more complete example would be something like:

--BoostrapEmail hmtl tags

<td id="userName"></td>

-- end of BoostrapEmail hmtl tags

<style onload="
     let data = JSON.parse(sessionStorage.User);
    document.getElementById('userName').innerHTML = data.Name;"
    ></style>

if anyone has a better solution for the goal i am trying to achieve using bootstrap email. Please make your recommendation

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda