![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
24/04/2013, 16:37
|
![Avatar de ivanin87](http://static.forosdelweb.com/customavatars/avatar227154_1.gif) | | | Fecha de Ingreso: marzo-2008
Mensajes: 77
Antigüedad: 16 años, 10 meses Puntos: 0 | |
No me reconoce función Tengo esta función que por ahora solo le tengo puesto un alert, para probar si funcionaba y luego añadir cosas:
<script type="text/javascript">
function descuento(){
var pvp = document.getElementById('pvp').value;
var oferta = document.getElementById('oferta').value;
alert ('pvp');
}
</script>
Y la llamó aquí:
<div><input id="pvp" type="text" style="width: 100px;" name="valor" onkeypress="descuento();" /><span style="color:#9700b5;font-weight: bold;">€</span></div>
Pero no salta el alert y el Firebug me dice al escribir que no reconoce la función descuento(), tal que así:
TypeError: descuento is not a function
descuento();
No se que problema puede haber... |