![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
qq_30595231
这个作者很懒,什么都没留下…
展开
-
javascript 函数
propertyIsEnumerable 是可以检测原型链上面的方法的 hasOwnProperty 是不能检测原型链上面的方法的isPrototypeOf 是监测 实例化的对象valueOf 是构造函数的返回值原创 2016-03-17 23:11:02 · 203 阅读 · 0 评论 -
文章标题
Employee.prototype = Object.create(Person.prototype); 只会去继承person 的原型方法原创 2016-03-17 23:49:48 · 214 阅读 · 0 评论 -
js获取网页高度
网页可见区域宽clientWidth document.body.clientWidth //padding+width 的和网页可见区域宽: offsetWidth (包括边线的宽) document.body.offsetWidth //padding+width+boder网页正文全文高 scrollHeight document.body.scrollHeight //padding+内容原创 2016-03-24 11:32:20 · 251 阅读 · 0 评论 -
javascript 字符串
anchor() 方法用于创建 HTML 锚。 charAt() 截取字符串 就一个参数 索引 成0开始 charCodeAt 字符编码 concat 字符串连接 a.endsWith() 匹配最后 startsWith() 匹配开头 includes(a) 判断字符串是否包含a substirng 两个参数都是索引 大的一方是不包括的 比喻(a.substring(0,3) 不包原创 2016-03-14 23:41:57 · 195 阅读 · 0 评论 -
javascript 常用方法
every()与some()方法都是JS中数组的迭代方法。every()是对数组中的每一项运行给定函数,如果该函数对每一项返回true,则返回true。some()是对数组中每一项运行指定函数,如果该函数对任一项返回true,则返回true。var arr = [ 1, 2, 3, 4, 5, 6 ]; console.log( arr.some( function( item, inde转载 2016-03-15 15:02:10 · 445 阅读 · 0 评论