I have a query. I use to call a function on javascript event in 2 ways.
Inside HTML tag like:
<div id='someid' onmouseover='callFunc()'>Some Text</div>Outside tag like in script tag/ external file:
document.getElementById('someid').onmouseover=function(){ alert('hi'); }
Now I think both serve the same purpose, then is there any difference between the two ways? Which one is better? What are the pros and cons of both? Second, is there any other way to call this function?