NatChen

Once you have chosen the road of life, you have to be brave enough to go to the end and never look back.

摘要: 插入排序 6. 重复步骤 2~5 function insertSort(arr){ var tmp; for(var i=1;i<arr.length;i++){ tmp = arr[i]; for(var j=i;j>=0;j--){ if(arr[j-1]>tmp){ arr[j]=arr[j 阅读全文
posted @ 2017-08-01 11:20 NatChen 阅读(192) 评论(0) 推荐(0)
摘要: touchcancel: //系统取消touch事件的时候触发,这个好像比较少用 每个触摸事件被触发后,会生成一个event对象,event对象里额外包括以下三个触摸列表 touches: //当前屏幕上所有手指的列表targetTouches: //当前dom元素上手指的列表,尽量使用这个代替to 阅读全文
posted @ 2017-08-01 10:23 NatChen 阅读(421) 评论(0) 推荐(0)
摘要: document.addEventListener("事件名称", 函数, false); function 某函数(event){ // 方法执行 } addEventListener里最后一个参数决定该事件的响应顺序; 如果为true事件执行顺序为 addEventListener 标签的onc 阅读全文
posted @ 2017-08-01 10:19 NatChen 阅读(1507) 评论(0) 推荐(0)