Javascript examples for DOM HTML Element:Ul
Get Value or Text of a List item (<UL> or <OL>)
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// w w w .j a v a 2 s . c om var li = document.getElementById("myLi") console.log(li.textContent || li.innerText); } </script> </head> <body> <ul> <li id="myLi">Hello, world</li> </ul> </body> </html>