笔记2
javascript的组成:
ECMAscript是js的核心,是符合ECMA-262标准的程序设计语言,不与浏览器绑定(类型,语句,关键字,运算符等);
每个浏览器都有自己的ECMAscript接口的实现,然后这个实现又被扩展,包含了DOM和BOM;
DOM:文档对象模型:DOM API可以轻松的删除、添加,替换文档节点
![](https://images2018.cnblogs.com/blog/1201991/201807/1201991-20180719163302436-1442221257.png)
BOM:浏览器对象模型;可以对浏览器窗口进行访问和操作;
![](https://images2018.cnblogs.com/blog/1201991/201807/1201991-20180719163407092-2033209331.png)
3.window
属性: window.history; window.loacation;
方法:window.open(); window.close();
window.setTimeout(); window.setInterval();
4.history
方法:history.back(); history.forward(); history.go();
5.location
属性:location.host; location.hostname; location.href;
方法:location.reload(); location.replace();
6.document
属性:document.referrer; document.URL;
方法:docuement.getElementById(); document.getElementsByTagName(); document.write();
7.innerHTML;
8.js内置对象
Array String Math Date
9.Date
初始化:
var today=new Date(); //返回当前日期和时间
var tdate=new Date("september1,2013,14:58:12");
![](https://images2018.cnblogs.com/blog/1201991/201807/1201991-20180719163509720-533341440.png)
10.Math
![](https://images2018.cnblogs.com/blog/1201991/201807/1201991-20180719163547154-18550552.png)
10.总结jsp页面跳转的方式有哪些:
(1)<a>标签
(2)jsp套java代码(重定向和请求转发)
(3)window.location.href=""
(4)<jsp:forward>
(5)form提交