You can execute javascript after page load in many different ways,
window.onload = function ...
document.onload = function ...
<body onload="script();">