'scripts' Example : scripts « Javascript Collections « JavaScript DHTML






'scripts' Example

    
<html>
<body>
<button onclick="getTotal();">Get total script tags</button>
<script language="JavaScript">
    function getTotal() {
        var m = document.scripts.length; 
        alert(m);
    }
</script>
<script language="JavaScript"></script>
<script language="JavaScript"></script>

<script language="JavaScript"></script>

<script language="JavaScript"></script>

<script language="JavaScript"></script>

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

<script language="JavaScript"></script>

<script language="JavaScript"></script>

</html>

    
      
      








Related examples in the same category