- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to set listStyleImage, listStylePosition, and listStyleType in one declaration with JavaScript?
To set the list properties in a single declaration, use the listStyle property in JavaScript.
Example
You can try to run the following code to set the listStylePosition and listStyleType property in one declaration with JavaScript −
<!DOCTYPE html> <html> <body> <ol id="myID"> <li>One</li> <li>Two</li> </ol> <button type="button" onclick="display()">Change style</button> <script> function display() { document.getElementById("myID").style.listStyle = "circle outside"; } </script> </body> </html>
Advertisements