JavaScript DHTML/Node Operation/tags

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

"tags()" Example

   <source lang="html4strict">
   

<html> <body> <script language="JavaScript">

   function function1() {
       alert(document.all.tags("p").length);
   }

</script>

This is a sample text.

This is another sample text.

This is another sample text.

This is another sample text.

This is another sample text.

This is another sample text.

This is another sample text.

This is another sample text.

This is another sample text.

This is another sample text.

This is another sample text.

<input type="button" value="Number of p elements" onClick="function1();"> </body> </html>


     </source>