Hand Simon 2014: Difference between revisions
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
</script> | </script> | ||
</source> | |||
<source lang="html4strict"> | |||
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> | |||
</source> | </source> |
Revision as of 16:06, 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>