摘要:
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 阅读全文
摘要:
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(... 阅读全文
摘要:
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 ... 阅读全文
摘要:
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" 阅读全文
摘要:
View Code 1 //有两个按钮分别响应两个事件,用来控制iframe显示的网页。 2 <script type="text/javascript"> 3 function bd(){ 4 var baidu = document.getElementById("i"); 5 baidu.src = "http://www.baidu.com"; 6 } 7 function xl(){ 8 var sina = document.getElementById("i"); 9 sina.src = 阅读全文