摘要:        
给People添加一个扩展方法,打印出people的所有属性View Code 1 using System; 2 public class ExtendMethod 3 { 4 public static void Main() 5 { 6 People p = new People(); 7 p.ToValue("小小",20,"女"); 8 } 9 }10 public static class Extend11 {12 public static void ToValue(this People pp,string na...    阅读全文
        posted @ 2012-08-01 19:51
午后の時間
阅读(145)
评论(0)
推荐(0)
            
        
        
摘要:        
1、查询出list中所有女生并且年龄小于18,并按降序排列View Code 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 public class Linq 5 { 6 public static void Main() 7 { 8 List<People> list = new List<People>(); 9 list.Add(new People(){Name="王艳",Age=10,Sex="女"});10 lis.    阅读全文
        posted @ 2012-08-01 19:49
午后の時間
阅读(280)
评论(0)
推荐(0)
            
        
        
摘要:        
1、定义一个数组string[] str= {"abcd","apple","@symjie","banana","orange"};①查询出str中以@符号开头的View Code 1 using System; 2 using System.Linq; 3 public class Linq 4 { 5 public static void Main() 6 { 7 string[] str= {"abcd","apple","@symjie    阅读全文
        posted @ 2012-08-01 19:45
午后の時間
阅读(259)
评论(0)
推荐(0)
            
        
        
摘要:        
创建一个表格,有表头,数据有8行,5列,当鼠标移动到数据上时,数据所在行更换颜色,鼠标移开恢复原来颜色View Code 1 <script type="text/javascript"> 2 function changeColor(color){ 3 color.style.backgroundColor = "yellow"; 4 } 5 function backColor(color){ 6 color.style.backgroundColor = "white"; 7 } 8 </script>     阅读全文
        posted @ 2012-08-01 19:42
午后の時間
阅读(127)
评论(0)
推荐(0)
            
        
        
摘要:        
在做遮罩的时候遇到一点小问题,希望阅读者能提出建议,帮忙修改一下,谢谢哈!View Code 1 <script type="text/javascript"> 2 3 </script> 4 <style type="text/css"> 5 html,body{ 6 margin:0px; 7 padding:0px; 8 } 9 #s{10 width:500px;11 height:400px;12 margin:0px auto;13 position:relative;14 border:1px solid    阅读全文
        posted @ 2012-08-01 19:38
午后の時間
阅读(113)
评论(0)
推荐(0)
            
        
        
摘要:        
View Code 1 <script type="text/javascript"> 2 function ChangeColor(){ 3 var dd = document.getElementById("d"); 4 var ss = document.getElementById("s"); 5 dd.style.backgroundColor = ss.value; 6 } 7 </script> 8 <style type="text/css"> 9 #d{10 w    阅读全文
        posted @ 2012-08-01 19:31
午后の時間
阅读(203)
评论(0)
推荐(0)
            
        
        
摘要:        
有两个按钮,实现iframe不同网页的切换View Code 1 <script type="text/javascript"> 2 function Yclick() 3 { 4 var img = document.getElementById("img"); 5 img.src="21.jpg"; 6 } 7 function Gclick() 8 { 9 var img = document.getElementById("img");10 img.src="22.jpg";    阅读全文
        posted @ 2012-08-01 19:24
午后の時間
阅读(155)
评论(0)
推荐(0)
            
        
        
摘要:        
这是我自己今天做的一些练习,有哪些不足,希望指点!View Code 1 <script type="text/javascript"> 2 function selectAll(fru){ 3 var check = document.getElementsByName("fruit"); 4 if(fru.checked){ 5 for(i=0;i<check.length;i++){ 6 check[i].checked = true; 7 } 8 }...    阅读全文
        posted @ 2012-08-01 19:21
午后の時間
阅读(152)
评论(0)
推荐(0)
                    
                
浙公网安备 33010602011771号