Browers Object Model

<!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" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>Browers Object Model</title>
	<script type="text/javascript">
	//<![CDATA[
		window.onload = function(){
			var yahoo = document.getElementById("yahoo");
			yahoo.onclick = function(){
				popUp(this.href);
				return false;
			}
			
			function popUp(url){
				window.open(url,"yahoo","width=200,height=200px");
			}
		}
	//]]>
	</script>
</head>
<body>
	<a href="http://www.yahoo.com" id="yahoo">Yahoo</a>
</body>

</html>

posted @ 2012-02-11 10:22  夏至冬末  阅读(151)  评论(0编辑  收藏  举报