onchange on select tag
<select id="comboA" onchange="getComboA(this)">
<option value="">Select combo</option>
<option value="Value1">Text1</option>
<option value="Value2">Text2</option>
<option value="Value3">Text3</option>
</select>
onchange on select tag
<select id="comboA" onchange="getComboA(this)">
<option value="">Select combo</option>
<option value="Value1">Text1</option>
<option value="Value2">Text2</option>
<option value="Value3">Text3</option>
</select>
js select on change value
document.getElementById('my-select').addEventListener('change', function() {
console.log('You selected: ', this.value);
});
onchange js
<script>
document.getElementById("fname").addEventListener("change", myFunction);
function myFunction() {
var x = document.getElementById("fname");
x.value = x.value.toUpperCase();
}
</script>
javascript add function to onchange event
transport_select.setAttribute("onchange", function(){toggleSelect(transport_select_id);});
// or
transport_select.onchange = function(){toggleSelect(transport_select_id);};
onchange event
<select class='select-option' [(ngModel)]="selected"
(change)='onOptionsSelected($event)'>
<option class='option' *ngFor='let option of dropDownData'
[value]="option.seo_val">{{option.text_val}}</option>
</select>
public onOptionsSelected(event) {
const value = event.target.value;
this.selected = value;
console.log(value);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us