Home >Web Front-end >JS Tutorial >(currentStyle)javascript Why sometimes I can't get the set CSS attributes when using style_javascript skills

(currentStyle)javascript Why sometimes I can't get the set CSS attributes when using style_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:10:00931browse

This is when the blue horizontal bar is clicked for the second time before the effect starts, which means that the first click does not get foot.style.display=="none", but in CSS I defined
#top {width:100px; background-color:#00CCFF; height:20px}
#foot {width:100px; background-color: #CCCC00; height:50px; display:none}





<script> <BR><!-- <BR>function qa(){ <BR>if (foot.style.display=="none") { <BR>foot.style.display="block";}; <BR>else { <BR>foot.style.display="none";} <BR>} <BR>--> <BR></script>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn