Edit in JSFiddle

function learnJS(){
	alert("Helloworld");
}
<div id="box1" onclick="learnJS();">
  <h2>
    눌러주세요.
  </h2>
</div>
#box1{
  width:100px;
  height:100px;
  padding:20px;
  margin:20px;
  background:#000;
  color:#fff;
}