This way using document.querySelectorAll.
<div>
<span style="color:red"></span>
<span style="display:none"></span>
</div>
<script type="text/javascript">
window.onload = function(){
//Will get all HTML SPAN with style tag.
var spans1 = document.querySelectorAll("span[style]");
alert(spans1.length);
//Will get SPAN with display:none
var spans2 = document.querySelectorAll("span[style='display:none']");
alert(spans2.length);
};
</script>
Demo