![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
19/05/2006, 11:44
|
| | Fecha de Ingreso: mayo-2006
Mensajes: 22
Antigüedad: 18 años, 8 meses Puntos: 0 | |
ok gracias por contestar tan rapido pero a mi si k me da el error,te paso todo el codigo:
[B]<HTML>
<HEAD>
<SCRIPT>
var numero1,numero2,numero3,numero4,numero5,numero6,nu mero7,acu=0;
var a,b,c,d,e,f,acu=0;
var numero=new String();
numero[0]="1.bmp";
numero[1]="2.bmp";
numero[2]="3.bmp";
numero[3]="4.bmp";
numero[4]="5.bmp";
numero[5]="6.bmp";
function tirar(){;
{
acu++;
if(acu==4||acu==7||acu==10||acu==13||acu==16||acu= =19||acu==22||acu==25||acu==28||acu==31||acu==34|| acu==37)
{
alert('Ya as tirado 3 veces');
alert('Cambio de jugador');
}
a=Math.random()*5;
a=Math.round(a);
b=Math.random()*5;
b=Math.round(b);
c=Math.random()*5;
c=Math.round(c);
d=Math.random()*5;
d=Math.round(d);
e=Math.random()*5;
e=Math.round(e);
img1.src=numero[a];
img2.src=numero;
img3.src=numero[c];
img4.src=numero[d];
img5.src=numero[e];
}
function comprobar()
{
var mio1,mio2,mio3,mio4,mio5,mio6,mio7,mio8,mio9,mio10 ,mio11,mio12,total1,total2;
mio1=document.form2.mio1.value;
mio2=document.form2.mio2.value;
mio3=document.form2.mio3.value;
mio4=document.form2.mio4.value;
mio5=document.form2.mio5.value;
mio6=document.form2.mio6.value;
mio7=document.form2.mio7.value;
mio8=document.form2.mio8.value;
mio9=document.form2.mio9.value;
mio10=document.form2.mio10.value;
mio11=document.form2.mio11.value;
mio12=document.form2.mio12.value;
total1=mio1+mio2+mio3+mio4+mio5+mio6;
total2=mio7+mio8+mio9+mio10+mio11+mio12;
alert(total1);
alert(total2);
}
}</script>
</HEAD>
<BODY id="body1" style="background:green">
<img src="dados2.gif" height="75" width="100" align="left">
<img src="dados3.jpg" height="75" width="100" align="right">
<center>
<form name="form1">
<p>
<input type="checkbox" id="r1" value="checkbox"> &nb sp;
<input type="checkbox" id="r1" value="checkbox"> &nb sp;
<input type="checkbox" id="r1" value="checkbox"> &nb sp;
<input type="checkbox" id="r1" value="checkbox"> &nb sp;
<input type="checkbox" id="r1" value="checkbox">
</form>
<p>
<img src="0.bmp" height="75" width="60" img name="img1">
<img src="0.bmp" height="75" width="60" img name="img2">
<img src="0.bmp" height="75" width="60" img name="img3">
<img src="0.bmp" height="75" width="60" img name="img4">
<img src="0.bmp" height="75" width="60" img name="img5">
</p>
<p>
<input type="button" name="Submit" value="Tirar" OnClick="tirar()">
</p>
</center>
<form name="form2">
<center>
P. JUGADOR 1:   ;
P. JUGADOR 2:
<p>
<p>
<h3>1</h3><input type="text"name="mio1">
<input type="text" name="mio7">
<p>
<p>
<h3>2</h3><input type="text" name="mio2">
<input type="text" name="mio8">
<p>
<p>
<h3>3</h3><input type="text" name="mio3">
<input type="text" name="mio9">
<p>
<p>
<h3>4</h3><input type="text" name="mio4">
<input type="text" name="mio10">
<p>
<p>
<h3>5</h3><input type="text" name="mio5">
<input type="text" name="mio11">
<p>
<h3>6</h3><input type="text" name="mio6">
<input type="text" name="mio12">
<p>
<input type="button" name="Submit" value="comprobar" OnClick="comprobar()">
</center>
</p>
</form>
<img src="dados3.jpg" height="75" width="100" align="left">
<img src="dados2.gif" height="75" width="100" align="right">
</BODY>
</HTML>
y perdon por el desorden en el codigo. xD |