How to Retrieving css values via javascript?

Hi this is one of good solution from my side, If anybody find new solution give me & Introduce people.

<div id=”hideProperty” style=”display:none”>
Test Hide Script getting value in javascript via.
</div>

<script type=”text/javascript” language=”javascript”>

var GLOBAL_Hide = “none”;
//alert(GLOBAL_Hide);

var hideProperty = document.getElementById(‘hideProperty’).style.display;

if(hideProperty == GLOBAL_Hide){
alert(hideProperty);
}
else {
document.write(‘<style type=”text/css”>#hideProperty{display: block; }</style>’);
}
</script>

Here what you want? you can write above script inside. that is your knowledge.

Comments are closed.

© 2020 Spirituality