javascript method when the page loads code example
Example: execute javascript function when page loads
window.onload = function() {
yourFunction(param1, param2);
};
window.onload = function() {
yourFunction(param1, param2);
};