Java script ile listeden verileri cekme (getElementsByTagName)
Java script ile listeden verileri cekme (getElementsByTagName) <script type=”text/javascript”> function a() { var list = document.getElementsByTagName(“LI”); for (var i = 0; i < list.length; i++) { alert(list[i].firstChild.data); } document.getElementById(“sayac”).innerHTML = list.length; } </script> <p id=”sayac”></p> <ul> <li> hasan aylas</li> <li> mustafa aylas</li> <li> hakkı aylas </li> </ul> <input id=”buton” type=”button” onclick=”a()” value=”Dene” />