What is the best unobtrusive way to call something after loading a page in plain javascript? of course in jquery i would use
$(document).ready(function(){...});
but I'm not sure about the most reliable approach in simple js.
clear
window.onload = ...
This is not the right decision, as it overwrites the previous ad.
what I'm trying to do is insert an iframe into the div after the page loads, but maybe there are better ways to do this. My plan is to do something like
window.onload = function(divId){
var div = document.getElementById(divId);
div.innerHTML = "<iframe src='someUrl' .. >";
}
EDIT:
.
script - , () -. , , - . js <script> - <script src="http://my.website/code.js" />. url iframe , -, - .
- .