javascript:window下的history对象

history对象

history对象包含用户(在浏览器中)访问的URL。可以通过window.history访问。
1.history属性
length:返回浏览器中历史列表中的URL的数量。
2.history方法
(1)back()方法:加载history列表中的前一个URL.
(2)forward():加载history列表中的后一个URL.
(3)go(n):加载history列表中的某个具体页面。n>0向后跳转,n<0向前跳转。go(1)==forward(),go(-1)==back().

以下是实例,historya.html



	
		
		history对象
	
	
		查看history实例
	


以下是实例,history.html


	
		
		history对象
		
	
	
		navigator
		
		
		
	




你可能感兴趣的:(JAVAScript对象,javascript,history,历史)