Сейчас "не работает" так:
<div id="scroll" style="height: 100px; width: 200px; background-color: #444; color:white;overflow: hidden;">123<br>sadsa<br>123<br>111<br>123<br>4tr<br>fdfs<br>123<br>ere<br>eerr<br>123<br>123<br>dfdf<br>dfdd<br>dfdf<br></div>
<script>
window.onload = function() {
scroll();
}
function scroll(){
var scr = document.getElementById('scroll');
var startX, startY;
var listener = function(e) {
startX = this.scrollLeft + e.pageX;
startY = this.scrollTop + e.pageY;
scr.addEventListener('mousemove', endListener);
};
var endListener = function(e) {
this.scrollLeft = startX - e.pageX;
this.scrollTop = startY - e.pageY;
return false;
};
scr.addEventListener('mousedown', listener);
window.addEventListener("mouseup", function(){
scr.removeEventListener('mousedown', endListener);
});
}
</script>