#idの使い方
警告を表示する
$("#btnAlert").click(function() { alert("ボタンをクリックしました!"); }); <button id="btnAlert">警告を表示する</button>