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
Release: 2016-05-16 19:10:00
Original
930 people have browsed it

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>
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template