Javascript example

HTML

<input type="submit" id="byBtn" value="Change" onclick="change()" />

JavaScript

function change() {
  alert("S");
}