SyntaxFix
Write A Post
Hire A Developer
Questions
Perhaps you might want to use "addEventListener"
document.getElementById("test").addEventListener('click',function () { foo2(); } );
Hope it's still useful for you