Rollover-effekt med JavaScript til left2.htm

  • Kode til HEAD-sektionen
  • Kode til BODY-sektionen


    Kode til HEAD-sektionen

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--//
    if (document.images) {
    img1on = new Image(); // Active images
    img1on.src = "buttons/00w.png";
    img2on = new Image();
    img2on.src = "buttons/fiw.png";
    img3on = new Image();
    img3on.src = "buttons/flw.png";
    img4on = new Image();
    img4on.src = "buttons/gow.png";
    img5on = new Image();
    img5on.src = "buttons/lew.png";
    img6on = new Image();
    img6on.src = "buttons/srw.png";
    img7on = new Image();
    img7on.src = "buttons/stw.png";
    img8on = new Image();
    img8on.src = "buttons/vew.png";

    img1off = new Image(); // Inactive images
    img1off.src = "buttons/00b.png";
    img2off = new Image();
    img2off.src = "buttons/fib.png";
    img3off = new Image();
    img3off.src = "buttons/flb.png";
    img4off = new Image();
    img4off.src = "buttons/gob.png";
    img5off = new Image();
    img5off.src = "buttons/leb.png";
    img6off = new Image();
    img6off.src = "buttons/srb.png";
    img7off = new Image();
    img7off.src = "buttons/stb.png";
    img8off = new Image();
    img8off.src = "buttons/veb.png";

    }
    function imgOn(imgName) {
    if (document.images) {
    document[imgName].src = eval(imgName + "on.src");
    }
    }
    function imgOff(imgName) {
    if (document.images) {
    document[imgName].src = eval(imgName + "off.src");
    }
    }
    //-->
    </SCRIPT>


    Kode til BODY-sektionen

    <A HREF="start.htm" onMouseOver="imgOn('img1')" onMouseOut="imgOff('img1')"><IMG NAME="img1" SRC="buttons/00b.png" border="0" ALT=""></A>
    <P>
    <A HREF="site1/fiskergodt.htm" onMouseOver="imgOn('img2')" onMouseOut="imgOff('img2')">
    <IMG NAME="img2" SRC="buttons/fib.png" border="0" ALT=""></A>

    <A HREF="animals/animals.htm#hippo" onMouseOver="imgOn('img3')" onMouseOut="imgOff('img3')"><IMG NAME="img3" SRC="buttons/flb.png" border="0" ALT=""></A>

    <A HREF="animals/animals.htm#goose" onMouseOver="imgOn('img4')" onMouseOut="imgOff('img4')"><IMG NAME="img4" SRC="buttons/gob.png" border="0" ALT=""></A>

    <A HREF="animals/animals.htm#leopard" onMouseOver="imgOn('img5')" onMouseOut="imgOff('img5')"><IMG NAME="img5" SRC="buttons/leb.png" border="0" ALT=""></A>

    <A HREF="site1/raphael_css.htm" onMouseOver="imgOn('img6')" onMouseOut="imgOff('img6')"><IMG NAME="img6" SRC="buttons/srb.png" border="0" ALT=""></A>

    <A HREF="animals/animals.htm#struds" onMouseOver="imgOn('img7')" onMouseOut="imgOff('img7')"><IMG NAME="img7" SRC="buttons/stb.png" border="0" ALT=""></A>

    <A HREF="site1/venezia.htm" onMouseOver="imgOn('img8')" onMouseOut="imgOff('img8')"><IMG NAME="img8" SRC="buttons/veb.png" border="0" ALT=""></A>


    Copyright Michael Karbo 2001














    >