I call function with document.write() to add inline content (ad banner):
<body>
Page content start<br>
<script>
function postContent(){
document.write('added content');
}
postContent();
</script>
<br>Page content end
</body>
on page I got:
Page content start
added content
Page content end
I want to add this content with delay, but inside setTimeout() document.write() overwrite all content.
<body>
Page content start<br>
<script>
function postContent(){
document.write('added content');
}
setTimeout(function () {
postContent();
}, 3000);
</script>
<br>Page content end
</body>
on page within 3s I got:
added content
How can I call function with document.write() with delay and do not overwrite all page?
Note: I do not have access to function that insert ad banner.