<!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <html> <head></head> <body> <script> function dump(text) { document.getElementById('clicked').innerHTML = text; } </script> <div style='overflow: scroll; width: 150px; height: 200px; background-color: yellow' id="outer"> <div style="width: 150px; height: 5000px; background-color: red;" onclick="dump('clicked')" id="inner"></div> </div> <div> Clicked: <span id='clicked'></span> </div> </body> </html>