Has Focus ? : Focus « Document « JavaScript DHTML






Has Focus ?

    
<html>
<body>
<button onclick="alert(document.hasFocus());">document.hasFocus()</button>
</body>
</html>

    
      
      








Related examples in the same category

1.Focus blur
2.Set focus to an element