摘要: 1、对象的拓展 ①Object.create(obj, {age:{value:18, writable:true, configurable:true, enumerable:true}); 以指定对象为原型创建新的对象 ②Object.defineProperties(obj, fullname 阅读全文
posted @ 2019-11-08 09:47 蛋炒饭123 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1、$.each() jquery中的方法 遍历数组$.each(arr, function(index, value){ console.log(value); }) 1 遍历数组 2 $.each(obj, function(key, value){ 3 console.log(key, val 阅读全文
posted @ 2019-11-08 09:32 蛋炒饭123 阅读(116) 评论(0) 推荐(0) 编辑
摘要: npm install moduleName # 安装模块到项目目录下 npm install -g moduleName # -g 的意思是将模块安装到全局,具体安装到磁盘哪个位置,要看 npm config prefix 的位置。 npm install --save moduleName # 阅读全文
posted @ 2019-11-06 15:00 蛋炒饭123 阅读(1903) 评论(0) 推荐(0) 编辑
摘要: 1. window.top 用来判断当前部分是否在页面的最顶层,比如:判断是否在iframe中,等等; 2.css3中width的属性值增加了。width:fit-content; 随内容的增加而撑开,不会因为单词的分隔自动wrap,还有一些属性值max-content,mini-content,f 阅读全文
posted @ 2019-07-24 13:21 蛋炒饭123 阅读(353) 评论(1) 推荐(0) 编辑