$(document).ready(function() { $("#btnSay").click(function() { alert('Hello World!'); }); }); <button type="button" id="btnSay">ここをクリック</button>