window的一些属性
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="智能社 - zhinengshe.com">
<meta name="copyright" content="智能社 - zhinengshe.com">
<title>智能社 - www.zhinengshe.com</title>
<script>
// alert(window.navigator.userAgent); 浏览器信息
// alert(window.navigator.language); 语言
// alert(window.navigator.platform); 操作系统 // http://www.baidu.com/abc.html?name=harry&age=18#link
// alert(window.location);
// alert(window.location.protocol); http:
// alert(window.location.host); www.baidu.com
// alert(window.location.pathname); /abc.html
// alert(window.location.search); ?name=harry&age=18
// alert(window.location.hash); #abc // alert(window.screen.width); 宽度
// alert(window.screen.height); 高度 </script>
</head> <body>
<input type="button" value="前进" onclick="window.history.go(1);" />
<input type="button" value="后退" onclick="window.history.go(-1);" />
<br /> <input type="button" value="前进" onclick="window.history.forward();" />
<input type="button" value="后退" onclick="window.history.back();" />
<br />
</body>
</html>
window的一些属性的更多相关文章
- 全局变量都是window对象的属性
var x = "haha"; var test = function(){ alert(this.x); } 上述,则会弹出 haha的值. 因为在JavaScript的变量作 ...
- window对象的属性及事件。
不同的运行环境有不同的“顶层对象”,而在浏览器的环境中,顶层对象就是window对象.window就是指当前的浏览器窗口. 例:var a = 1: window.a; //1 1.window对象的 ...
- Ext.Window 的常见属性
Ext.Window 的常见属性: plain:true,(默认不是) resizable:false,(是否可以改变大小,默认可以) maximizable:true,(是否增加最 ...
- 使用window.navigator.userAgent属性判断浏览器类型及版本
使用window.navigator.userAgent属性判断浏览器类型及版本 2011-12-11 22:03:11 window.navigator.userAgent属性包含了浏览器类型.版本 ...
- window对象的属性方法名造成的命名冲突
事件起因: 一次开发中需要获取一个数组的长度,写下如此代码 function func(arr){ length = arr.length; ......//相关操作 } 程序在chrome下正常运行 ...
- JavaScript DOM编程基础精华02(window对象的属性,事件中的this,动态创建DOM,innerText和innerHTML)
window对象的属性1 window.location对象: window.location.href=‘’;//重新导航到新页面,可以取值,也可以赋值. window.location.reloa ...
- window的设置属性
1.windowAnimationStyle 用于设置一组window动画的引用style资源,window的动画属性由R.styleable.WindowAnimation定义. Winow动画类属 ...
- window.location各属性的值
window.location各属性的值 window.location.href "https://i.cnblogs.com/EditPosts.aspx?opt= ...
- JavaScript中的window对象的属性和方法;JavaScript中如何选取文档元素
一.window对象的属性和方法 ①setTimeout()方法用来实现一个函数在指定毫秒之后运行,该方法返回一个值,这个值可以传递给clearTimeout()用于取消这个函数的执行. ②setIn ...
- window的常用属性
常用属性: 1.closed:用于判断一个指向window对象的引用是否已关闭.请看下面代码: var newWnd = window.open("NewURL.htm",&quo ...
随机推荐
- Go第十篇之反射
反射是指在程序运行期对程序本身进行访问和修改的能力.程序在编译时,变量被转换为内存地址,变量名不会被编译器写入到可执行部分.在运行程序时,程序无法获取自身的信息. 支持反射的语言可以在程序编译期将变量 ...
- ACM-ICPC 2018 徐州赛区网络预赛H Ryuji doesn't want to study(树状数组)题解
题意:给你数组a,有两个操作 1 l r,计算l到r的答案:a[l]×L+a[l+1]×(L−1)+⋯+a[r−1]×2+a[r] (L is the length of [ l, r ] that ...
- Leetcode ——Partition Equal Subset Sum
Question Given a non-empty array containing only positive integers, find if the array can be partiti ...
- CSS3 常用选择器
p:last-of-type{background-color: red;} 选择p中最后一项 p:nth-of-type(2n){background-color: red;} 隔行变色里面也可以填 ...
- CMD与AMD区别
- 使用InputStreamReader读入,使用OutputStreamWriter写出,将一首诗按行重写?
https://www.processon.com/view/link/5b1a3880e4b00490ac8f5f40 改善后: (可将不管一行有几个字时的不规律的文本,按行倒写) package ...
- Select2下拉框总结
用了这么久的Select2插件,也该写篇文章总结总结.当初感觉Select2不是特别好用,但又找不到比它更好的下拉框插件. 在我的印象里Select2有2个版本,最新版本有一些新的特性,并且更新了一下 ...
- 机器学习-数据可视化神器matplotlib学习之路(四)
今天画一下3D图像,首先的另外引用一个包 from mpl_toolkits.mplot3d import Axes3D,接下来画一个球体,首先来看看球体的参数方程吧 (0≤θ≤2π,0≤φ≤π) 然 ...
- 华中农业大学预赛 B Handing Out Candies 余数的和
Problem B: Handing Out Candies Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 258 Solved: 19[Submit ...
- python 元组切片
#create a tuple tuplex = (, , , , , , , , , ) #used tuple[start:stop] the start index is inclusive a ...