Gifu/head
From 2014.igem.org
(Difference between revisions)
Line 16: | Line 16: | ||
</style> | </style> | ||
- | <script type="text/javascript | + | <script type="text/javascript" > |
- | + | ||
- | + | OnMouse = new Array(); | |
- | + | for(i = 0; i < 4; i++) { | |
- | + | OnMouse[i] = new Image(); | |
- | for( i = 0 ; i < | + | OnMouse[i].src = "https://static.igem.org/mediawiki/2014/f/f9/Menu_up.png" + i + ".png" |
- | + | } | |
- | + | function cImg(flag) { | |
- | + | var imgEle = document.getElementById('imgmap'); | |
- | + | imgEle.src = OnMouse[flag].src; | |
- | + | return false; | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | function | + | |
- | + | ||
- | + | ||
} | } | ||
+ | OnMouse = new Array(); /*配列でsample0.gif 〜 sample3.gif までの4個の画像を選べるようにしています*/ | ||
+ | for(i = 0; i < 4; i++) { | ||
+ | OnMouse[i] = new Image(); | ||
+ | OnMouse[i].src = "sample" + i + ".gif" | ||
+ | } | ||
+ | function cImg(flag) { /*関数cImg の「flag」の数字を変えれば、適切な画像を選べるようにしています*/ | ||
+ | var imgEle = document.getElementById('imgmap'); /*<img>要素に付けたIDで呼び出しています*/ | ||
+ | imgEle.src = OnMouse[flag].src; | ||
+ | return false; | ||
} | } | ||
</script> | </script> | ||
Line 49: | Line 45: | ||
<img id="map" src="https://static.igem.org/mediawiki/2014/f/f9/Menu_up.png" width="800" height="200" usemap="#map" alt="head" name=”rollover” /> | <img id="map" src="https://static.igem.org/mediawiki/2014/f/f9/Menu_up.png" width="800" height="200" usemap="#map" alt="head" name=”rollover” /> | ||
<map name="map" id="map"> | <map name="map" id="map"> | ||
- | <area shape="circle" coords="90,70,50" href="https://2014.igem.org/Team:Gifu" onMouseOver=" | + | <area shape="circle" coords="90,70,50" href="https://2014.igem.org/Team:Gifu" |
+ | onMouseOver="cImg(https://static.igem.org/mediawiki/2014/f/f9/Menu_up.png)" onMouseOut="cImg(https://static.igem.org/mediawiki/2013/c/c6/Menu_hover_home.png)" alt="home"/> | ||
<area shape="circle" coords="210,105,50" href="https://2014.igem.org/Team:Gifu/Team" onMouseOver="paintRol('rollover',2)" onMouseOut="paintRol('rollover',0)" alt="team"/> | <area shape="circle" coords="210,105,50" href="https://2014.igem.org/Team:Gifu/Team" onMouseOver="paintRol('rollover',2)" onMouseOut="paintRol('rollover',0)" alt="team"/> | ||
<area shape="circle" coords="335,120,50" href="https://2014.igem.org/Team:Gifu/Project" onMouseOver="paintRol('rollover',3)" onMouseOut="paintRol('rollover',0)" alt="project"/> | <area shape="circle" coords="335,120,50" href="https://2014.igem.org/Team:Gifu/Project" onMouseOver="paintRol('rollover',3)" onMouseOut="paintRol('rollover',0)" alt="project"/> |
Revision as of 05:31, 31 August 2014