Петр Григорич,
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled</title>
<script>
document.oninput = function(event) {
document.getElementById('result').innerHTML += event.target.id;
}
</script>
</head>
<body>
<div id="divId">
<span id="spanId">Привет</span>
<br>
<input id="inputId1">
<br>
<input id="inputId2">
<br>
<span id="result"></span>
</div>
</body>
</html>