Javascript examples for CSS Style Property:listStyle
Change the type and position of a list to "square inside":
<!DOCTYPE html> <html> <body> <ul id="myList"> <li>Coffee</li> <li>Tea</li> <li>Water</li> <li>Soda</li> </ul>// ww w . jav a 2 s . c o m <button type="button" onclick="myFunction()">Change list style</button> <script> function myFunction() { document.getElementById("myList").style.listStyle = "square inside"; } </script> </body> </html>