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);
});
php input onchange
/*
You can't execute PHP in the browser.
Do an AJAX call or POST to a PHP function on the web server,
or write a Javascript function that executes in the browser.
*/
// html
<input name="file" onchange="mainInfo(this.value);"
// AJAX
function mainInfo(id) {
$.ajax({
type: "GET",
url: "mypage.php",
data: "mainid =" + id,
success: function(result) {
$("#somewhere").html(result);
}
});
};
// php
<?php
if(isset($_GET['mainid'])){
mainInfo($_GET['mainid']);
}
?>
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