function event_alert(){
alert("ボタンが押されました");
}
var button = document.getElementById("alert");
button.addEventListener("click", event_alert, false);
js_cc_08_add_event
------------------
A [Pen](https://codepen.io/m-shinkawa/pen/eKNmXE) by [m-shinkawa](https://codepen.io/m-shinkawa) on [CodePen](https://codepen.io).
[License](https://codepen.io/m-shinkawa/pen/eKNmXE/license).
js_add_event
------------
A [Pen](https://codepen.io/m-shinkawa/pen/eKNmXE) by [m-shinkawa](https://codepen.io/m-shinkawa) on [CodePen](https://codepen.io).
[License](https://codepen.io/m-shinkawa/pen/eKNmXE/license).