Hi,
I would do result loop where the only exists title attribute and how to make the result of the title attribute?
This code does not work:

<html>
<head>
<script type="text/javascript">
function ppp() 
{
      var i=0;
      for(i=0;i<9;i++)
      {      
        var idm='a' + i;
        var AttributeA=document.getElementById(idm).getAttributeNode("title");
        if (AttributeA) 
        {
          document.write("number: " + i + " - " + AttributeA.value);
          document.write("<br />");
        }
      } 
}
</script>
</head>
<body>
<ul>
<li id="a1">1</li>
<li id="a2" title="100">2</li>
<li id="a3" title="100">3</li>
<li id="a4" title="150">4</li>
<li id="a5">5</li>
<li id="a6" title="120">6</li>
<li id="a7">7</li>
<li id="a8" title="130">8</li>
<li id="a9" title="100">9</li>
</ul>
<a href="#" onclick="ppp();">click</a>

</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.