<!DOCTYPE HTML>
<html>
<head>
<style>
#block {
width:100%;
height:600px;
border:1px solid black;
}
</style>
</head>
<body>
<div id="block">
<input type="text">
<input type="text">
<input type="text">
<input type="text">
</div>
<script>
var elem = document.body.children[0];
elem.onclick = function (e) {
if(e.target != this) return;
alert("ok");
}
</script>
</body>
</html>