Код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<style type="text/css">
#A{ position : absolute; border : 1px solid black; width : 640px; height : 480px; overflow : scroll;}
#B{ border : 1px solid red; width : 800px; height : 600px; }
</style>
<script type="text/javascript">
function scroll()
{
alert('Scroll');
}
function init()
{
document.getElementById('A').onscroll=scroll;
}
onload=init;
</script>
</head>
<body>
<div id='A'><div id='B'></div></div>
</body>
</html>