2015年11月14日

摘要: window.onload = function() { var oWrap = document.getElementById('wrap'), oList1 = document.getElementById('list1'), oList2 = document.getElementById('list2'), aLi = oLi... 阅读全文

posted @ 2015-11-14 17:31 斯是陋室,惟吾德馨 阅读(140) 评论(0) 推荐(0) 编辑

摘要: var arr= []; var obj = { name : 'a', age : 20, sex = 'male' }; for(a[a.length] in obj); console.log(a); 阅读全文

posted @ 2015-11-14 17:26 斯是陋室,惟吾德馨 阅读(193) 评论(0) 推荐(0) 编辑

摘要: 对于一个数组,怎样才能最快找出数组中的最大值 var nums = [1,56,78,345,67,89,3423,34,5,7]; var max = 0; for(var i=0; i max){ max = nums[i]; } } console.log( "第一种排序方式:", max ); console.log('第二种排序方式:',Math.ma... 阅读全文

posted @ 2015-11-14 17:22 斯是陋室,惟吾德馨 阅读(592) 评论(0) 推荐(0) 编辑