As in pure JavaScript to create an HTML design?


Please tell me how to using pure JavaScript to create such a structure?

 <script src="//" async></script>

Trying to create this:

document.createElement( `

 <script src="//" async></script>

` ).appendChild( document );

Not working...
July 2nd 19 at 14:05
2 answers
July 2nd 19 at 14:07
document.write('<script src="//" async></script>');
Thank you! Tell me why climbs this error: document.write can be a form of eval - Johnathan.Nader44 commented on July 2nd 19 at 14:10
: Can warning? Just warns about a possible security vulnerability. You should ensure what goes into the function to avoid xss attacks. - whitney commented on July 2nd 19 at 14:13
July 2nd 19 at 14:09

Find more questions by tags JavaScript