how to run a function only when page loads code example
Example: run on load js
function codeAddress() {
alert('ok');
}
window.onload = codeAddress;
function codeAddress() {
alert('ok');
}
window.onload = codeAddress;