<html>
<head>
<script>
window.onload = function() {
alert("Subframe onload");
}
window.onunload = function() {
alert("Subframe onunload")
}
window.onpageshow = function(evt) {
alert("Subframe onpageshow");
}
window.onpagehide = function(evt) {
alert("Subframe onpagehide");
}
</script>
</head>
<body>
This subframe has an unload handler.
</body>
</html>