Gifu/head

From 2014.igem.org

(Difference between revisions)
Line 16: Line 16:
</style>
</style>
-
<script type="text/javascript" src="js/rollover.js">
+
<script type="text/javascript" >
-
/* Rollover Script */
+
-
 
+
OnMouse = new Array();
-
if(navigator.appVersion.charAt(0) >=3){
+
    for(i = 0; i < 4; i++) {
-
var rolimg = new Array();
+
    OnMouse[i] = new Image();
-
for( i = 0 ; i < 10 ; i++ ){
+
    OnMouse[i].src = "https://static.igem.org/mediawiki/2014/f/f9/Menu_up.png" + i + ".png"
-
rolimg[i] = new Image();
+
    }
-
}
+
function cImg(flag) {
-
 
+
    var imgEle = document.getElementById('imgmap');
-
 
+
    imgEle.src = OnMouse[flag].src;
-
rolimg[0].src= "https://static.igem.org/mediawiki/2014/f/f9/Menu_up.png"
+
    return false;
-
rolimg[1].src= "https://static.igem.org/mediawiki/2013/c/c6/Menu_hover_home.png"
+
-
rolimg[2].src= "https://static.igem.org/mediawiki/2013/2/27/Menu_hover_team.png"
+
-
rolimg[3].src= "https://static.igem.org/mediawiki/2013/a/ae/Menu_hover_project.png"
+
-
rolimg[4].src="https://static.igem.org/mediawiki/2013/4/4d/Menu_hover_note.png"
+
-
rolimg[5].src="https://static.igem.org/mediawiki/2013/e/e1/Menu_hover_result.png"
+
-
rolimg[6].src="https://static.igem.org/mediawiki/2013/f/fd/Menu_hover_more.png"
+
-
}
+
-
 
+
-
 
+
-
function paintRol(dim,cnt){
+
-
if(navigator.appVersion.charAt(0) >= 3 ){
+
-
document.images[dim].src=rolimg[cnt].src;
+
}
}
 +
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="paintRol('rollover',1)" onMouseOut="paintRol('rollover',0)" alt="home"/>
+
   <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

head home team project note result more