Good day, here I tested this code,
window.onload = function() { /* ваш код */ }; But, that he does not launch all events, is there something similar and more secure in work? I am still learning how to work with javascript. To force a command in javascript.