open location.href 跳转

<style type="text/css">
			div{
				width:100px;
				height:100px;
				background:red;
				border:10px solid black;
				padding:10px;
			}
		</style>

  

<div></div>

  

<script type="text/javascript">
//			var a = 10;
//			alert(a);
//			var oDiv = document.getElementsByTagName("div")[0];
//			console.log(oDiv.offsetWidth);//包括边框的宽度
//			console.log(oDiv.clientWidth);//不包括边框的宽度

//			window.open("http://www.baidu.com");//新建一个页面然后打开open中的地址参数
//			open("http://www.baidu.com");

//			window.location.href = "http://www.baidu.com";//在本页面中跳转地址
		</script>

  

posted @ 2016-03-06 11:17  mingjixiaohui  阅读(249)  评论(0编辑  收藏  举报