js .change code example
Example 1: .on change get value
$('select').on('change', function() {
alert( this.value );
});
Example 2: handling event changes
<button>Act-once button</button>
<script>
let button = document.querySelector("button");
function once() {
console.log("Done.");
button.removeEventListener("click", once);
}
button.addEventListener("click", once);
</script>