document.addEventListener( "DOMContentLoaded" , function() { reloadcaptcha.onclick = function() { alert('test'); }; });