请教一个链接跳转的问题,谢谢
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><style type="text/css">#center{ MARGIN-RIGHT: auto; MARGIN-LEFT: auto; height:200px; background:#fff; width:400px; vertical-align:middle; line-height:200px; }</style><script language="javascript">function linkonclick(){ var links=document.getElementsByTagName('a'); for(var i=0;i<links.length;i++) { links[i].onclick=function(){ document.getElementById('center').style.display=""; }; }}window.onload=linkonclick;function alertcontent(){ document.getElementById('center').style.display="";}</script><body><div id="center" style="display:none"><img src="logo2.gif" /></div><a href="http://www.hao123.com" >test</a><a href="http://www.hao123.com" >dddd</a><input type="button" value="button" onclick="alertcontent()"/></body></html>