How to identify if a setting value has changed in input
? I have the prototype below, however, the alert
will be displayed according to the number of times the class="ultimo-valor"
appears in the code.
<input class="ultimo-valor" onKeyUp="ultimoValor(this)" type="text"
value="<?php echo $ultimo_valor; ?>"/>
<input class="ultimo-valor" onKeyUp="ultimoValor(this)" type="text"
value="<?php echo $ultimo_valor; ?>"/>
Script:
<script>
$(document).ready(
function ultimoValor(e) {
$('.ultimo-valor').on("change paste keyup", function() {
alert($(this).val());
});
});
</script>