一个奇技淫巧的困惑...
一个网页中有如下代码:
<script>
function Exit_OA()
{
window.open("/general/exit_close.asp","OA_EXIT","height=2,width=2,top=2000,left=2000");
}
function re_login()
{
parent.parent.close();
window.open("relogin.asp","OA_RELOGIN","top=2000,left=2000");
}
</script>
<script language="JavaScript">
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
</script><a href="#" onclick="re_login();">注销</font></a>
我点击“注销”的时候,它新打开了一个relogin.asp,自己就关闭了,奇怪啊???
href="#"的本页确不显示。
请问它是怎么实现的?也就是让 href="#" 显示不出页面来的效果是如何实现的?