
25/06/2014, 22:45
|
| | Fecha de Ingreso: febrero-2013
Mensajes: 264
Antigüedad: 12 años Puntos: 1 | |
Script en TOP FRAME Hola buenas, tengo el siguiente script el cual lo que realiza es lo siguiente : son botones que al presiona 1 boton suman +1, el script funciona bien,lo que sucede es que me gustaría que fuera todo igual PERO el resultado de ese +1 apareciera en un TOP FRAME y los botones estuvieran en un MAIN FRAME, esto seria posible ?
Aqui dejo el código :
<form action="" method="">
<div align="center">
<input type="text" value="95" id="a" size="2"/>
<a href="javascript:inc_count('a');"> <img src="sumar.png" width="20" height="20" /></a>
<input type="text" value="94" id="b" size="2" name="text"/>
<a href="javascript:inc_count('b');"> <img src="sumar.png" width="20" height="20" /></a>
</div>
<p/>
</form>
<script>
function inc_count(id)
{
res = document.getElementById(id);
if(parseInt(res.value)<100)
{
res.value = parseInt(res.value)+1;
}
}
</script> |