document load javascript function code example Example: js document onload //use window.onload=()=>{};