I use $('select').change(function(){alert('changed');});
for issue an alert every time the option
is changed, but i need to alert even the default option, that is, in the first option of option
$('select').change(function(){
alert('changed');
});
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<body>
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
</body>
</html>
How to print alert when the first option("volvo") is loaded, but it did not come from a change?
P.S.:Sorry for my bad english