alert by code stackoverflow code example
Example: alert by code stackoverflow
<script language="javascript" type="text/javascript">
alert('This is what an alert message looks like.');
</script>
function showAlert() {
var country = "Fiji";
var city = "Suva";
alert('The city of ' + city + ' is located in ' + country + '.');
}
<input type="button" value="Click Here" onClick="showAlert();">