Avatar billede farili10 Nybegynder
28. september 2003 - 22:27 Der er 1 løsning

Udskiftning af billede i table

<html>

    <head>

<script type="text/javascript">
<!-- Start

function MinPopUp() {
window.open('Pop-up.html','popup','height=300,width=300');
}
function PopUpTid() {
setTimeout('MinPopUp()', 2500);
}

//  Slut -->
</script>

       
        <title>Mithon Online Portofolio</title>
    </head>

    <body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" >
        <table width="650" border="0" cellspacing="0" cellpadding="0" height="350">
            <tr height="340">
                <td width="321" height="340">
                    <table width="322" border="0" cellspacing="0" cellpadding="0" cool gridx="5" gridy="5" height="351" showgridx showgridy usegridx usegridy>
                        <tr height="350">
                            <td width="321" height="350" valign="top" align="left" xpos="0"><img src="Pictures/Sko.gif" alt="" height="350" width="321" border="0" autolowsrc></td>
                            <td width="1" height="350"><spacer type="block" width="1" height="350"></td>
                        </tr>
                        <tr height="1" cntrlrow>
                            <td width="321" height="1"><spacer type="block" width="321" height="1"></td>
                            <td width="1" height="1"></td>
                        </tr>
                    </table>
                </td>
                <td height="340">
                   
                </td>
            </tr>
        </table>
    <body onload="PopUpTid()">

        <p></p>
    </body>

</html>




hvis i kan se det billede der hedder Pictures/Sko.gif det skal skiftes ud for hver gang man kommer ind på denne side. jeg har 20 andre billeder det kan skiftes ud med hvordan får jeg til det de andre billeder ligger i den samme mappe
Avatar billede mm12010 Nybegynder
29. september 2003 - 09:46 #1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Mithon Online Portofolio</title>
<script type="text/javascript">
<!-- Start
function MinPopUp() {
window.open('Pop-up.html','popup','height=300,width=300');
}
function PopUpTid() {
setTimeout('MinPopUp()', 2500);
}
pictures=new Array();
pictures[0]="Pictures/pic1.gif";
pictures[1]="Pictures/pic2.gif";
pictures[2]="Pictures/pic3.gif";
pictures[3]="Pictures/pic4.gif";
pictures[4]="Pictures/pic1.gif";
pictures[5]="Pictures/pic2.gif";
pictures[6]="Pictures/pic3.gif";
pictures[7]="Pictures/pic4.gif";
pictures[8]="Pictures/pic1.gif";
pictures[9]="Pictures/pic2.gif";
pictures[10]="Pictures/pic3.gif";
pictures[11]="Pictures/pic4.gif";
pictures[12]="Pictures/pic1.gif";
pictures[13]="Pictures/pic2.gif";
pictures[14]="Pictures/pic3.gif";
pictures[15]="Pictures/pic4.gif";
pictures[16]="Pictures/pic1.gif";
pictures[17]="Pictures/pic2.gif";
pictures[18]="Pictures/pic3.gif";
pictures[19]="Pictures/pic4.gif";

function swapPics(){
    if(document.images){
        num = (Math.random() * ((pictures.length - 1)));
        num = Math.round(num);
        document.images['billede'].src = pictures[num];
        }
    return;
    }
//  Slut -->
</script>
</head>
<body bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" onload="PopUpTid(); swapPics();">
    <table width="650" border="0" cellspacing="0" cellpadding="0" height="350">
        <tr height="340">
            <td width="321" height="340">
                <table width="322" border="0" cellspacing="0" cellpadding="0" cool gridx="5" gridy="5" height="351" showgridx showgridy usegridx usegridy>
                    <tr height="350">
                        <td width="321" height="350" valign="top" align="left" xpos="0"><img src="Pictures/Sko.gif" alt="" height="350" width="321" border="0" name="billede" autolowsrc></td>
                        <td width="1" height="350"><spacer type="block" width="1" height="350"></td>
                    </tr>
                    <tr height="1" cntrlrow>
                        <td width="321" height="1"><spacer type="block" width="321" height="1"></td>
                        <td width="1" height="1">&nbsp;</td>
                    </tr>
                </table>
            </td>
            <td height="340">&nbsp;</td>
        </tr>
    </table>
</body>
</html>
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester