<html onkeydown="test()">
    <script>
        function test()
        {
            var element = parent.document.getElementById("iframe");
            element.parentNode.removeChild(element);
        }
    </script>
</html>
