How can I test if a HTML element is focused? I want to execute a code when a dropdown select list ISN'T selected. So, If you click on the document, anywhere else in than the select list, a JavaScript unselect all of it's elements.
This statement doesn't worked:
var items=document.getElementById("items");
items.focused==false;
I hope somebody can help me out.