Answer the question
In order to leave comments, you need to log in
How to display the result of a js script in the same place where it is inserted on the page?
Hello, there is a js script that collects a DIV block and you need to display it in the same place where there will be such a js that calls it
<script type="text/javascript" async="async" src="//site.local/uploads.js"></script>
Answer the question
In order to leave comments, you need to log in
Here is the solution
let script = document.currentScript;
script.parentNode.insertBefore(div, script);
https://developer.mozilla.org/ru/docs/Web/API/Docu...
pay attention to Notes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question