Jump to content
Ssociety

Help on javascript

Recommended Posts

I tried to google it but I can't find the answer, can someone help me

 

<!DOCTYPE html>
<html>
<head>
    <title></title>

    <style type="text/css">
    .slider-indicators> .indicator{
            width: 10px;
            height: 10px;
            margin: 1px;
            display: inline-block;

            border-radius: 10px;    
            border-color: white;
            border-style: solid;

            background-color:black;
        }
    </style>

    <script type="text/javascript">
        var indicatt=document.getElementsByClassName(".indicator");
        function aa() {
            alert(indicatt.length);
        }
    </script>

</head>
<body onload="aa()">
<div>
    <div class="crumbGroup">
        <div class="slider-indicators">
            <span class="indicator"></span>
            <span class="indicator"></span>
            <span class="indicator"></span>
            <span class="indicator"></span>
            <span class="indicator"></span>
        </div>
    </div>
</div>
</body>
</html>

 

It seems document.getElementsByClassname is not working, I have five .indicators

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×