PDA

View Full Version : Javascript


luckyone
31-08-2004, 15:46
Cari amici di web avrei bisogno urgentemente di un javascript, ma non capendoci ancora gran che chiedo disperatamente: AIUTOOOOOOOOOOOOOOO:muro: :cry: :cry: :cry: :cry: :cry: :cry: :cry:

cionci
31-08-2004, 16:20
Almeno scrivi cosa ti serve ;)

luckyone
31-08-2004, 18:41
Originariamente inviato da cionci
Almeno scrivi cosa ti serve ;)
Hai perfettamente ragione. Per spiegare meglio ti prego di vedere l'allegato. Chiedo ancora scusa...

luckyone
02-09-2004, 15:12
Qualcuno mi aiuti.:cry: :cry: :cry:

luckyone
05-08-2005, 20:45
per molti è una bischerata, ma per me NOOOOOOOOOOOOOOO. Aiutatemi :muro:

anx721
06-08-2005, 00:39
Visto che non hai avuto risposta prova a postare qui:

http://forum.html.it/forum/forumdisplay.php?s=&forumid=3

mslvm
06-08-2005, 13:20
puoi usare diversi metodi, dal javascript che ti scrive la pagina:

<html>
<head>
<script language="javascript" >
function randomNumber()
{
var IntPage= "<table border=\"1\" width=\"100%\"><tr><td>"
var IntNumber = ""
for (ctr=1; ctr<=3; ctr++) {
if (ctr==1) {
IntPage= IntPage + Math.round( Math.random() * 9) + "</td>"}
else {IntPage = IntPage + "<td>" + Math.round(Math.random() * 9) + "</td>"}
}
IntPage=IntPage+ "</tr></table>" + "<table border=\"1\" width=\"100%\" id=\"table2\"><tr><td>"
for (ctt=1; ctt<=7; ctt++) {
if (ctr==1) {
IntPage= IntPage + Math.round( Math.random() * 9) + "</td>"}
else {IntPage = IntPage + "<td>" + Math.round(Math.random() * 9) + "</td>"}
}
IntPage=IntPage + "</tr></table>"
document.write(IntPage)
}
</script>
</head>
<body onLoad="randomNumber()">


</body>
</html>


alla funzione che genera un numero da 0 a 9, ripetuta nei punti dove ti serve



<html>
<head>
<script language="javascript" >
function randomNumber()
{

document.write(Math.round( Math.random() * 9));

}
</script>
</head>
<body> <table border="1" width="20%">
<tr>
<td><script>randomNumber();</script></td>
<td><script>randomNumber();</script></td>
<td><script>randomNumber();</script></td>
</tr>
<table border="1" width="20%">
<tr>
<td><script>randomNumber();</script></td>
<td><script>randomNumber();</script></td>
<td><script>randomNumber();</script></td>
<td><script>randomNumber();</script></td>
<td><script>randomNumber();</script></td>
<td><script>randomNumber();</script></td>
<td><script>randomNumber();</script></td></tr>


</body>
</html>