JavaScript Reference/Javascript Methods/hasFocus

Материал из Web эксперт
Версия от 11:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"hasFocus()" Example

   <source lang="javascript">
   

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


     </source>
   
  


"hasFocus()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |document | +----------------+--------------------------------------------------------------+

     </source>
   
  


"hasFocus()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Does the document have focus. Returns true or false.

Syntax:

document.hasFocus()


     </source>