CSS/gifu/main

From 2014.igem.org

(Difference between revisions)
Line 388: Line 388:
GO TOP!</br>
GO TOP!</br>
<img src="https://static.igem.org/mediawiki/2014/d/d4/Factory1.png" id ="factory" alt="factory1"  
<img src="https://static.igem.org/mediawiki/2014/d/d4/Factory1.png" id ="factory" alt="factory1"  
-
onClick="imgchange()"></img>
+
onClick="imgchangeA()"
 +
onMouseOver="imgchangeB()"
 +
onMouseOut="imgchangeC()"
 +
></img>
</div>
</div>
<script>
<script>
Line 402: Line 405:
var cnt = 1;
var cnt = 1;
-
function imgchange(){
+
function imgchangeA(){
if(cnt>=4){cnt=1}
if(cnt>=4){cnt=1}
else{cnt+=2}
else{cnt+=2}
 +
document.getElementById("factory").src=img[cnt].src;
 +
};
 +
function imgchangeB(){
 +
cnt=2
document.getElementById("factory").src=img[cnt].src;
document.getElementById("factory").src=img[cnt].src;
};
};
 +
 +
function imgchangeC(){
 +
cnt=1
 +
document.getElementById("factory").src=img[cnt].src;
 +
};
 +
</script>
</script>

Revision as of 05:37, 18 September 2014

GO TOP!
factory1