- 博客(13)
- 收藏
- 关注
转载 git日常使用
一、git账号配置查看git配置git config --list(查看user.email=***@emial 是否为自己账号)全局配置git账号git config --global user.name 你的名字git config --global user.email 你的账号二、日常开发:克隆一个本地代码仓库git c...
2018-12-21 17:10:00
133
转载 eslint 校验去除
不允许对 function 的参数进行重新赋值/* eslint no-param-reassign: ["error", { "props": false }] */屏蔽当前行校验// eslint-disable-line转载于:https://www.cnblogs.com/Alice-Xu/p/9985730.html...
2018-11-19 21:10:00
262
转载 JS复制文本到剪切板
// 是否支持复制export const isSupportCopy = ((!!document.queryCommandSupported) && document.queryCommandSupported('copy'));const copyTempElement = document.createElement('textarea');c...
2018-11-07 10:38:00
160
转载 js对比for、forEach、map遍历数组速度
function a() { var arr = new Array(1000000); for(var i = 0; i < arr.length;i ++) { arr[i] = i; } var start1 = new Date().getTime(); for(var i = 0; i < arr.length;i ...
2018-04-12 14:09:00
306
转载 js数组去重
1.数组去重var arr = ['1','2','3','13','4','2','0','7','6','3','2'];Array.prototype.unique = function() { var temArr = new Array(); for(var i in this) { if(typeof this[i] !== 'function' &&...
2018-04-11 21:27:00
98
转载 js中的闭包
function test() { var name = 'alice'; return { getName : function() { console.info(name); }, setName : function(newName) { name = newName; } }};var person1 = test();perso...
2018-04-11 20:54:00
83
转载 js中call、apply、bind的区别
var Person = { name : 'alice', say : function(txt1,txt2) { console.info(txt1+txt2); console.info(this.name); }}var Dog = { name : 'tom', say : function(txt1,txt2) { console.info(txt...
2018-04-11 20:27:00
72
转载 css画圆
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width"> <title>css画圆</title> <styl...
2018-03-20 15:12:00
149
转载 css实现多行文字限制显示&编译失效解决方案
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, us...
2018-03-20 15:05:00
195
转载 js声明变量作用域会提前
var s = 1;function test() { console.info(s); var s = 2; console.info(s);}test();>>>undefined>>>2转载于:https://www.cnblogs.com/Alice-Xu/p/8569036...
2018-03-14 17:43:00
85
转载 js判断当前移动设备平台
//js判断当前移动设备平台var isiOs = false;var isAndroid = false;var isWindowsPhone = false;if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { isiOS = true;} else if(/(Android)/i.test(...
2018-03-13 17:43:00
137
转载 input标签处理多文件上传
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, us...
2018-03-13 17:18:00
166
转载 js通过String取得对应全局Object的值
//假设有个全局对象Personvar Person = { 'name' : 'alice'}//通过某种配置,获得了字符串形式的对象名var thisPerson = 'Person';//需要取得该对象的值var PersonName;//巧用window对象PersonName = window[thisPerson].name;...
2018-03-13 15:55:00
97
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人