JavaScript
|
19-05-2010, 16:00
Mensagem: #3
|
|||
|
|||
RE: JavaScript
<script type="text/javascript">
function baralhar(){ var i; for (img=1;img<26;img++){ for(i=1;i<26;i++){ table.p(i)="img.src='..WEB/imagens/img'+Math.floor(25*Math.random())+'.jpg" } } </script> </head> <body onLoad="iniciar()"> <h1>***Puzzle em JavaScript***</h1> <table border="0" width="1200px"> <tr> <td width="400px"> <table border="10" cellspacing="0px" cellpadding="0px";> <tr> <td id="p1"><img src="../WEB/imag04/img1.jpg"/></td> <td id="p2"><img src="../WEB/imag04/img2.jpg"/></td> <td id="p3"><img src="../WEB/imag04/img3.jpg"/></td> <td id="p4"><img src="../WEB/imag04/img4.jpg"/></td> <td id="p5"><img src="../WEB/imag04/img5.jpg"/></td> </tr> <tr> <td id="p6"><img src="../WEB/imag04/img6.jpg"/></td> <td id="p7"><img src="../WEB/imag04/img7.jpg"/></td> <td id="p8"><img src="../WEB/imag04/img8.jpg"/></td> <td id="p9"><img src="../WEB/imag04/img9.jpg"/></td> <td id="p10"><img src="../WEB/imag04/img10.jpg"/></td> </tr> <tr> <td id="p11"><img src="../WEB/imag04/img11.jpg"/></td> <td id="p12"><img src="../WEB/imag04/img12.jpg"/></td> <td id="p13"><img src="../WEB/imag04/img13.jpg"/></td> <td id="p14"><img src="../WEB/imag04/img14.jpg"/></td> <td id="p15"><img src="../WEB/imag04/img15.jpg"/></td> </tr> <tr> <td id="p16"><img src="../WEB/imag04/img16.jpg"/></td> <td id="p17"><img src="../WEB/imag04/img17.jpg"/></td> <td id="p18"><img src="../WEB/imag04/img18.jpg"/></td> <td id="p19"><img src="../WEB/imag04/img19.jpg"/></td> <td id="p20"><img src="../WEB/imag04/img20.jpg"/></td> </tr> <tr> <td id="p21"><img src="../WEB/imag04/img21.jpg"/></td> <td id="p22"><img src="../WEB/imag04/img22.jpg"/></td> <td id="p23"><img src="../WEB/imag04/img23.jpg"/></td> <td id="p24"><img src="../WEB/imag04/img24.jpg"/></td> <td id="p25"><img src="../WEB/imag04/pixel.gif"/></td> </tr> </table> <input type="button" value="Baralhar imagens" onClick="baralhar()"/><br/><br/> ____________________________________________________ Seria algo genero isto, eu sei que nao funciona... eu sei que tem erros! mas se me conseguissem por isto a trabalhar é que era uma ajuda e tanto!!! Acho que é a forma de indicar o que é que vai levar as imagens! "table.p(i)" ... porque eu fiz segundo um exemplo que tinha f1.resps.value=r; |
|||
« Mais Antigo | Mais Recente »
|
Mensagem neste Tópico |
JavaScript - patriciamachado - 18-05-2010, 23:11
RE: JavaScript - Bruno Bernardino - 18-05-2010, 23:33
RE: JavaScript - patriciamachado - 19-05-2010 16:00
RE: JavaScript - Bruno Bernardino - 19-05-2010, 16:32
|
Utilizadores a ver este tópico: 1 Visitante(s)