<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script>
//window.navigator.userAgent : 浏览器信息
//alert( window.navigator.userAgent )
if ( window.navigator.userAgent.indexOf('MSIE') != -1 ) {
alert('我是ie');
} else {
alert('我不是ie');
}
</script>
</head>
<body>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script>
//window.location : 地址
/*
window.location.href = window.location内容
window.location.search = url?后面的内容
window.location.hash = url#后面的内容
*/
//alert( window.location );
//alert( window.location.href );//地址
//alert( window.location.search );
//alert( window.location.hash );
</script>
</head>
<body>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script>
window.status = 'maiov';
//alert( window.status );
</script>
</head>
<body>
</body>
</html>