krutoy, доделай до рабочего
<body onbeforeunload="return 'are you sure you want to exit'">
<input />
<form>
<div style="display: none">
<input type="submit"/>
TEXT
</div>
</form>
<script>
get=document.querySelector.bind(document)
input=get("input")
div=get("div")
input.onfocus=function(){
div.style.display="block"
}
input.onblur=function(){
div.style.display="none"
}
</script>
<body onbeforeunload="return 'are you sure you want to exit'">
<input />
<form>
<div style="_display: none">
<input type="submit"/>
TEXT
</div>
</form>
<script>
get=document.querySelector.bind(document)
input=get("input")
div=get("div")
input.onfocus=function(){
div.style.display="block"
}
input.onblur=function(){
div.style.display="none"
}
</script>