Are there ways for me to listen for onblur or onclick events in javascript from an onload function? instead of doing it in the element itself.
The better way it's used DOM (works perfectly) like this. Firs write Yours function/class and use it in:
document.addEventListener('DOMContentLoaded', function(){ // put here code });
Cklik!
It's doesn't matter where You used this few lines. You can put it in head or in body.