
Problema con javascript embebido
Publicado por Giuliano (13 intervenciones) el 09/10/2013 19:20:08
Bueno el caso es que introduje un codigo javascript en un fichero html pero no funciona, no da error alguno, ya me he asegurado de tener el javascript activado en el navegador. Probe con Chrome e IE8.
Gracias
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html>
<head>
<title>Ferreteria</title>
<script language="JavaScript">
var almacen= new Array([100,"Tornillo",20,30],[50,"Tuercas",10,30]);
function Stock(){
var x;
for (x=0,x<almacen.length,x++){
s+="codigo" + almacen[x,0] + "Descripcion" + almacen[x,1] + "Precio" + almacen [x,2] + "Existencia" + almacen[x,3] +"\n";
}
alert(s);
}
</script>
</head>
<body>
<table border=5 align="center" width=600px>
<tr>
<td align="center" colspan=2;>
<input type="button" value="Ver Stock" name="b1" onClick="Stock();"/>
</td>
</tr>
<tr align="left" border=5>
<td>
<input type="button" value="Alta" name="b2" onClick="Alta"/>
</td>
<td>
<p>Codigo de articulo<input type="text" value="" name="codart"/></p>
<p>Descripcion<input type="text" value="" name="descripcion"/></p>
<p>PVP<input type="text" value="" name="pvp"/></p>
<p>Existencia<input type="text" value="" name="existencia"/></p>
</td>
</td>
</tr>
<tr align="left" border=5>
<td>
<input type="button" value="Buscar art." name="b2" onClick="Buscar"/>
</td>
<td>
<p>Codigo de articulo<input type="text" value="" name="codart"/></p>
</td>
</td>
</tr>
<tr align="left" border=5>
<td>
<input type="button" value="Vender art." name="b3" onclick="Vender"/>
</td>
<td>
<p>Codigo de articulo<input type="text" value="" name="codart"/></p>
<p>Cantidad<input type="text" value="" namne="cantidad"/></p>
</td>
</td>
<tr>
<td align="center" colspan=2>
<input type="button" value="Ver estado de caja" name="b4" onclick="vercaja"/>
</td>
</tr>
</tr>
</table>
</body>
</html>
Valora esta pregunta


0