Hand Simon 2014: Difference between revisions
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
<script> | <script> | ||
var count=0 | var count=0; | ||
function change () { | function change () { | ||
var x= document.getElementsByTagName ("img") | var x= document.getElementsByTagName ("img"); | ||
count=count+1 | count=count+1; | ||
if (count==6) { | if (count==6) { | ||
count=0 | count=0; | ||
} | } | ||
//alert(count) | //alert(count); | ||
x[0].src = count+".jpg" | x[0].src = count+".jpg"; | ||
} | } | ||
</script> | </script> | ||
</source> | </source> |
Revision as of 16:08, 23 September 2014
I don't know <u>what</u> to do! <br>
<img src = "neutral.jpg" onclick ='change ()'>
<!-- <img src = "1.jpg"> <img src = "2.jpg"> <img src = "3.jpg"> <img src = "4.jpg"> <img src = "5.jpg"> -->
<script>
function change () {
x= document.getElementsByTagName ("img")
x[0].src = "1.jpg"
x[0].src = "2.jpg"
}
</script>
I don't know <u>what</u> to do! <br>
<img src = "0.jpg" onclick ='change ()'>
<!-- <img src = "1.jpg"> <img src = "2.jpg"> <img src = "3.jpg"> <img src = "4.jpg"> <img src = "5.jpg"> -->
<script>
var count=0;
function change () {
var x= document.getElementsByTagName ("img");
count=count+1;
if (count==6) {
count=0;
}
//alert(count);
x[0].src = count+".jpg";
}
</script>