MyHtml.html
<script type="text/javascript" language="javascript">// <![CDATA[ function esckeydown() { if(event.keyCode==27){ event.returnValue = null; window.returnValue = null; window.close(); } } //document.οnkeydοwn=esckeydown; function esckeydownHide() { if(event.keyCode==27){ document.getElementById('test').style.display='none'; } } document.οnkeydοwn=esckeydownHide; function test(){ document.getElementById('test').style.display='block'; } // ]]></script><!DOCTYPE html>
<html>
<head>
<title>MyHtml.html</title>
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
<script language="javascript">
function esckeydown()
{
if(event.keyCode==27){
event.returnValue = null;
window.returnValue = null;
window.close();
}
}
//document.οnkeydοwn=esckeydown;
function esckeydownHide()
{
if(event.keyCode==27){
document.getElementById('test').style.display='none';
}
}
document.οnkeydοwn=esckeydownHide;
function test(){
document.getElementById('test').style.display='block';
}
</script>
</head>
<body>
<div style="height: 200px;width: 200px;display:none" id="test">
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
</div>
<a href="javascript:void(0);" οnclick="test()">test</a>
</body>
</html>