Example 2

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Jquery example 2</title>
<style>
.Active
{
background-color: green;
font-size: 148px;
}
.Inactive
{
background-color: red;
font-size: 148px;

}
</style>

</head>
<body>
<div id="myDiv">

</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
for(var i =1;i<=100;i++)
{
$("#myDiv").append('<input class="Active" type=button value='+i+'>')
}

$('.Active').click(function () {
alert('Seat has been reserved')
$(this).removeClass('Active')
$(this).addClass('Inactive')

})
})
</script>
</body>
</html>