You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
506 B
JavaScript
13 lines
506 B
JavaScript
function MausDrauf(Nummer) {
|
|
var oldPic = document.images[Nummer].src;
|
|
var off = oldPic.lastIndexOf("off");
|
|
if (off != -1) { /* Sicherheitsabfrage */
|
|
var newPic = oldPic.substring(0,off) + "on";
|
|
document.images[Nummer].src = newPic + ".gif";}}
|
|
|
|
function MausWeg(Nummer) {
|
|
var Bild = document.images[Nummer].src;
|
|
var on = Bild.lastIndexOf("on");
|
|
if (on != -1) { /* Sicherheitsabfrage */
|
|
var newPic = Bild.substring(0,on) + "off" + Bild.substring(on + 2, Bild.length);
|
|
document.images[Nummer].src = newPic;}} |