ECMAScript:JavaScript的语法标准。包括变量、表达式、运算符、函数、if语句、for语句等。javascript
DOM:文档对象模型,操做网页上的元素的API。好比让盒子移动、变色、轮播图等。html
BOM:浏览器对象模型,操做浏览器部分功能的API。好比让浏览器自动滚动。 java
BOM:Browser Object Model,浏览器对象模型。浏览器
常见的几个对象history location nabigator window函数
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <script> // open方法 setTimeout(function () { // window对象打开窗口 window.open('http://www.baidu.com', '_self'); },2000); //location对象:至关于解析url setTimeout(function () { location.href = "http://www.baidu.com"; window.location.reload();//重加载 }, 5000); // navigator对象 能够获取客服端一些信息 console.log(navigator.userAgent); console.log(navigator.platform); </script> </body> </html>
history对象
一、后退:url
history.back()spa
history.go(-1):0是刷新orm
二、前进:htm
history.forward()对象
history.go(1)