Home >Web Front-end >JS Tutorial >Change img images through onmouseover tab_javascript skills

Change img images through onmouseover tab_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:00:241504browse
复制代码 代码如下:





选项卡实现img图片的变换














<script> <br>function show(n){ <br>for(var i=1;i<=4;i ){ <BR>document.getElementById("tab" i).style.backgroundColor='green'; <BR>document.getElementById("p" i).style.display='none'; <BR>//display实现内容的隐藏与否的控制,当为none是,隐藏 <BR>} <BR>document.getElementById("tab" n).style.backgroundColor='white'; <BR>document.getElementById("p" n).style.display='block'; <BR>//当block时,隐藏的即可显示 <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