Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [js] problem
Majcok12
post
Post #1





Grupa: Zarejestrowani
Postów: 54
Pomógł: 0
Dołączył: 20.02.2004

Ostrzeżenie: (0%)
-----


Mam taki kod, ale nie wiem dokladnie jak mam to napisac zeby zamiast samych obrazkow byly to "obrazkowe linki".

Kod
<html>

<head>

<SCRIPT LANGUAGE="JavaScript">

<!--

var Obrazki = new Array()

Obrazki[0] = 'screen/2generalsm.jpg'

Obrazki[1] = 'screen/beretm.jpg'

Obrazki[2] = 'screen/ET12m.jpg'

Obrazki[3] = 'screen/ET7m.jpg'

Obrazki[4] = 'screen/ET8m.jpg'

Obrazki[5] = 'screen/helpm.jpg'

Obrazki[6] = 'screen/matrixm.jpg'

Obrazki[7] = 'screen/minym.jpg'

Obrazki[8] = 'screen/SWm.jpg'

var j = 0

var p = Obrazki.length;

var preBuffer = new Array()

for (i = 0; i < p; i++){

preBuffer[i] = new Image()

preBuffer[i].src = Obrazki[i]

}

var whichImage = Math.round(Math.random()*(p-1));

function PokazObrazek(){

document.write('<img border="1" src="'+Obrazki[whichImage]+'">');

}

-->

</script>

<head>

<body>

<SCRIPT LANGUAGE="JavaScript">

<!--

PokazObrazek();

-->

</script>

</body>

</html>



PZdr
Go to the top of the page
+Quote Post
Paul
post
Post #2





Grupa: Zarejestrowani
Postów: 636
Pomógł: 0
Dołączył: 22.10.2003
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Cytat
"obrazkowe linki"

Kod
document.write('<a href="costam"><img border="1" src="'+theImages[whichImage]+'"></a>');

o takie cos chodzi?
Go to the top of the page
+Quote Post
Majcok12
post
Post #3





Grupa: Zarejestrowani
Postów: 54
Pomógł: 0
Dołączył: 20.02.2004

Ostrzeżenie: (0%)
-----


Wielkie dzięki:D:D!!!

PZdr
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 14:42