JSFiddle - React, Tailwind, and code Playground

HTML

<button type="button" class="btn" onClick="$('#dauer').val('2');">Bis zum Saisonende</button>

<button type="button" class="btn" id = "test">Bis zum Saisonende2</button>

<input id="dauer" type="text" value="1" />

JavaScript

$('#test').click(function() {
	sendMessage();

});

function sendMessage() {
  alert('hi');
  alert('h2');
}