TAG
CSS
JavaScript
Result
Run
License
<h1 id="title" style="text-decoration: line-through !important;"> The getPropertyPriority() Method </h1> <button type="button" id="btn-get">Is color property the first priority?</button> <p></p>
#title { color: #0000FF !important; font-weight: normal; } #btn-get { font-size: 15px; } p { color: #FF0000; }
window.addEventListener("load", function() { document.querySelector("#btn-get").onclick = function() { var isPriority = document.querySelector("#title").style.getPropertyPriority("text-decoration"); document.querySelector("p").textContent = isPriority; }; });
Console
expand_less
License
License
by DevDic
Close