anzahl select

Horusab

Erfahrenes Mitglied
hi
wie kann ich mit javascript feststellen, wie viele elemente vom typ <select> es in einem aktiven document hat?

mfg Horusab
 
Hallo,

versuch:
Code:
<html>
<head>
  <script type="text/javascript">
    function count(){
      var   x = document.getElementsByTagName('select');
      alert(x.length);
    }
  </script>
</head>
<body onload="count()">
... inhalt
</body>
</html>

ciao
 
Zurück