解读 html 弹出页面代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>HTML 弹出页面示例</title>
<script type="text/javascript">
function popup()
{
window.open("http://www.dreamdu.com/xhtml/", "", "toolbar=no,height=300,width=500");
return false;
}
</script>
</head>
<body>
<p><a href="http://www.dreamdu.com/xhtml/">HTML教程</a> <a href="http://www.dreamdu.com/xhtml/popup/"><strong>HTML 弹出页面</strong></a> 示例</p>
<p><a href="http://www.dreamdu.com/xhtml/" title="使用弹出页面" onclick="return popup()" onkeypress="return popup()">HTML教程弹出页面</a></p>
</body>
</html>
本页显示页面是
HTML教程 HTML 弹出页面 示例
HTML教程弹出页面
我疑惑在 <p><a href="http://www.dreamdu.com/xhtml/" title="使用弹出页面" onclick="return popup()" onkeypress="return popup()">HTML教程弹出页面</a></p>
为什么onclick="return popup()" onkeypress="return popup()">这样写 想弹出页面直接用<a>好啦 为什么等来等去的