摘要: 面试的时候常考主要的思路是,先生成一个1到100的数组,然后在利用随机数,循环遍历数组将顺序打乱。。 1 int[] arr = new int[100]; 2 for (int i = 0; i < 100; i++) 3 { 4 arr[i] = i + 1; 5 } 6 for (int i = 0; i < 100; i++) 7 { 8 Random rand = new Random(i); 9 ... 阅读全文
posted @ 2014-03-11 14:39 贾锡安 阅读(878) 评论(0) 推荐(1) 编辑
摘要: 操作checkbox,全选反选 1 //全选 2 function checkAll() { 3 $('input[name="TheID"]').attr("checked", "checked"); 4 } 5 //反选 6 function uncheckAll() { 7 $('input[name="TheID"]').each(function() { 8 this.checked = !this.checked; 9 })10 }11 //获取选中的项1... 阅读全文
posted @ 2014-03-11 14:32 贾锡安 阅读(283) 评论(0) 推荐(0) 编辑