<body OnBeforeUnLoad="javascript:window.stop()" OnLoad="javascript:location.replace('http://yandex.ru')" > Текст </body>