Lo que estoy tratando de hacer es al ese campo llamado Total cuando se cambie a un numero mayor o igual que 1 muestre una alerta ejemplo: nuevo valor en campo total: 4. Ahora mismo el script envia una alerta hasta si es 0 ese campo, la idea es que la mande solo cuando es >=1 y no 0. No logro solucionar esto.
este es mi codigo:
Código:
y 1 pedacito del html:<script type="text/javascript"> function Init () { var textarea = document.getElementById ("textarea"); if (textarea.addEventListener) { // Firefox, Opera, Google Chrome and Safari textarea.addEventListener ('textInput', OnTextInput, false); // Google Chrome and Safari } } // Google Chrome and Safari function OnTextInput (event) { alert ("The following text has been entered: " + event.data); } // Firefox, Google Chrome, Opera, Safari from version 5 function OnInput (event) { alert ("The new content: " + event.target.value); } // Internet Explorer function OnPropChanged () { if (event.propertyName.toLowerCase () == "value>==1") { alert ("NUEVO VALOR CAMPO TOTAL: " + event.srcElement.value); } } </script>
Código HTML:
<td width="150" height="100"><input type="text" name="getAmount" style="width:300px; height:80; text-align: left;" class="last_inp" value="" onpropertychange="$('advert_1').css('display', 'none'); OnPropChanged ();"></td>