Is there a cross-browser solution for monitoring when the document.activeElement changes?
While @James’s answer above is correct. I’ve added more details to make it a completely working solution along with the use of focus event too. <html> <body> <input type=”text” id=”Text1″ name =”Text1″ value=””/> <input type=”text” id=”Text2″ name =”Text2″ value=””/> <SELECT><OPTION>ASDASD</OPTION><OPTION>A232</OPTION></SELECT> <INPUT TYPE=”CHECKBOX” id=”Check1″/> <INPUT type=”TEXT” id=”text3″/> <input type=”radio”/> <div id=”console”> </div> <textarea id=”textarea1″> </textarea> <script> … Read more