![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javaScript
文章平均质量分 77
吴少雄
人生就是从一个坑跳到另一个坑,每一个坑里都会有便便和糖
展开
-
javaScript基础知识点总结
第一课时 入门基础 1、window作用域 只要在script标签中定义的变量,默认就在window的作用域之下默认就是window这个对象里面写代码 2、数据类型 如何判断js中的数据类型: typeof、instanceof、 constructor、 prototype方法比较 如何判断js中的类型呢,先举几个例子:转载 2016-10-15 18:14:47 · 601 阅读 · 0 评论 -
不用看了,赶紧跟着敲一遍!
一、元素查找 //1.Node节点 document.getElementById(id); document.querySelector(selector); document.doctype; document.documentElement; document.head; document.title; document.body; //2.NodeList,节点数组 document.原创 2016-10-04 19:19:41 · 291 阅读 · 0 评论 -
js事件详解
一、监听事件 绑定事件,ie有attachEvent,w3c有addEventListener, 解除绑定,ie有detachEvent,w3c有removeEventListener jQuery做了很好的封装,api也比较多,bind,live,delegate,on等等,其不同api也所区别,由于版本问题,个别api也有所区别。我个人一般都用同一个,要么用bind,要么用on。转载 2016-10-19 18:40:10 · 447 阅读 · 0 评论 -
ECMAScript6知识点概要
1. let、const 和 block 作用域 let 允许创建块级作用域,ES6 推荐在函数中使用 let 定义变量,而非 var: var a = 2; { let a = 3; console.log(a); // 3 } console.log(a); // 2 同原创 2016-10-19 22:47:42 · 286 阅读 · 0 评论 -
js常用效果代码封装
1、时间格式化 Date.prototype.Format = function(format) { //对所有时间对象加上原型操作 format ? format : format = "yyyy-MM-dd hh:mm:ss"; //不传则默认format(最后一个format可以删掉) var o = { //this并不在对象的内原创 2016-10-29 22:50:28 · 607 阅读 · 0 评论