Properti style.listStyleType digunakan untuk menetapkan tipe list-item marker.
Sintaks:
obj.style.listStyleType = value;
Nilainya:
- Constants
disc
(default),circle
,square
,decimal
,decimal-leading-zero
,lower-roman
,upper-roman
,hebrew
,georgian
,armenian
,cjk-ideographic
,hiragana
,katakana
,hiragana-iroha
,katakana-iroha
,lower-latin
,lower-alpha
,upper-latin
,upper-alpha
,lower-greek
. inherit
.
Berikan nilai none
untuk style.listStyleType, jika tidak ingin list-item marker digunakan.
Contoh:
<HTML>
<HEAD>
<TITLE>style.listStyleType</TITLE>
</HEAD>
<BODY>
<UL ID="mylist">
<LI>Lorem ipsum...1</LI>
<LI>Lorem ipsum...2</LI>
<LI>Lorem ipsum...3</LI>
<LI>Lorem ipsum...4</LI>
<LI>Lorem ipsum...5</LI>
</UL>
<SCRIPT TYPE="text/javascript">
var ulElem = document.getElementById("mylist");
ulElem.style.listStyleImage = "url(picture.png)";
ulElem.style.listStyleType = "disc";
</SCRIPT>
<BUTTON TYPE="button" ONCLICK="document.getElementById('mylist').style.listStyleImage = 'none';">None!</BUTTON>
</BODY>
</HTML>