对象、数组 深度复制,支持对象嵌套数组、数组嵌套对象
摘要:对象复制 Object.prototype.maps = function(){ let newObj = new Object(); let that = this; Object.keys(that).forEach(function(k){ if( that[k].constructor ==
阅读全文
posted @
2018-08-06 15:31
YC小杨
阅读(279)
推荐(0)
仿 window对象 confirm方法
摘要:效果图: 调用方式: Confirm('确定删除?', function(boo){ if(boo){ //用户点击确定 }else{ //用户点击取消 } }) CSS: .Btn{display: inline-block;margin-bottom: 0;font-weight: normal
阅读全文
posted @
2018-08-02 16:31
YC小杨
阅读(289)
推荐(0)
仿 window对象 alert 方法
摘要:效果图: 调用方法: Alert('提示内容'); CSS: .Btn{display: inline-block;margin-bottom: 0;font-weight: normal;text-align: center;vertical-align: top;cursor: pointer;
阅读全文
posted @
2018-08-02 16:22
YC小杨
阅读(296)
推荐(0)