#idの使い方

$("#btnAlert").click(function() {
  alert("ボタンをクリックしました!");
});  

<button id="btnAlert">警告を表示する</button>