JavaScript Reference/Javascript Methods/urns

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

"urns()" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> function function1() {

   var m = document.all.urns("clientCaps");
   if (m) {
       alert("YES");
   } else {
       alert("NO");
   } 

} </script> <input type="button"

      value="Is there any "clientCaps" 
      behavior attached to this page?" 
      onClick="function1();">

</body> </html>


     </source>
   
  


"urns()" is applied to

   <source lang="javascript">

Names noted with an asterisk (*) are JavaScript properties only. +----------------+--------------------------------------------------------------+ | Applied_To |all* anchors* | | |applets* areas* | | |boundElements* cells* | | |childNodes* children* | | |elements* embeds* | | |<form> forms* | | |images* links* | | |options* rows* | | |scripts* <select> | | |styleSheets* tBodies* | +----------------+--------------------------------------------------------------+

     </source>
   
  


"urns()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Returns a list of elements with the specified behavior attached. Returns null if no behavior found.

Syntax:

document.all.elementID.urns(param1) collectionName.urns(param1) Parameters:

   param1   Required; the behavior"s name.
   
     
     </source>