摘要: View Code 1 using System; 2 public class GetValue 3 { 4 /*为People扩展一个方法ToValue 5 要求为:能把People里面所有属性的值打印出来*/ 6 public static void Main() 7 { 8 People people = new People(); 9 people.Get("康熙",300);10 }11 }12 public static class ToValue13 {14 public static void G... 阅读全文
posted @ 2012-08-04 10:49 晓 漪 阅读(355) 评论(0) 推荐(0) 编辑
摘要: View Code 1 //问题:1,查询出str中以@符号开头的 2 //2,查询出Str中元素长度大于5的元素 3 using System; 4 using System.Linq; 5 public class StudyLinq 6 { 7 public static void Main() 8 { 9 string[] str = {"abcd","apple","@symjie","banana","orange"};10 var s = str.Where(p=>p.Sta 阅读全文
posted @ 2012-08-01 19:59 晓 漪 阅读(438) 评论(0) 推荐(0) 编辑
摘要: View Code 1 //1,查询出list中所有女生并且年龄小于18,并按降序排列 2 //2,查询出list中名字为“王”开头,并且长度为3的学生 3 using System; 4 using System.Collections.Generic; 5 using System.Linq; 6 public class StudyLinq 7 { 8 public static void Main() 9 {10 List<People> list = new List<People>();11 list.Add(new People(... 阅读全文
posted @ 2012-08-01 19:36 晓 漪 阅读(11790) 评论(1) 推荐(0) 编辑
摘要: View Code 1 //实现checkbox的全选和取消 2 <script type="text/javascript"> 3 function all(all){ 4 var checkbox = document.getElementsByName("select"); 5 if (all.checked){ 6 for (i = 0;i<checkbox.length ;i++ ) 7 { 8 checkbox[i].checked = true; 9 ... 阅读全文
posted @ 2012-08-01 19:30 晓 漪 阅读(190) 评论(0) 推荐(0) 编辑
摘要: View Code 1 //实现局部遮罩 2 <script type="text/javascript"> 3 function Shade(){ 4 var s = document.getElementById("shade"); 5 s.style.display = "block"; 6 } 7 function Display(){ 8 var d = document.getElementById("shade"); 9 d.style.display = "none" 阅读全文
posted @ 2012-08-01 19:25 晓 漪 阅读(462) 评论(0) 推荐(0) 编辑