Edit in JSFiddle

<!doctype html>
<html>
<head>

</head>
<body>
<form>
<input type="button" value="Button1" onclick="btnClick(event)">

<input id="b2" type="button" value="Button2">
</form>

</body>
</html>
function btnClick(event) {
	alert(event.target.value+"클릭됨!!");
}
document.getElementById('b2').onclick = function(event) {alert(event.target.value+"클릭됨!!")}