jQuery中操纵元素属性的方法:
attr(): 读或者写匹配元素的属性值.
removeAttr(): 从匹配的元素中移除指定的属性.
attr()方法 读操作
attr()读操作. 读取的是匹配元素中第一个元素的指定属性值.
格式: .attr(attributeName),返回值类型:String.读取不存在的属性会返回undefi...
分类:
Web程序 时间:
2015-01-22 15:38:12
阅读次数:
190
HashSet泛型类在数据组织上类似于数学上的集合,可以进行“交”、“并”、“差”等运算。
1、HashSet对象
HashSet泛型类创建的对象称为集合,如:
01.HashSet set = HashSet;
那么set就是一个可以存储 string 类型数据的集合,set 可以调用 add(String s) 方法将 string 类型的数据添加到集合中。添加到集合中的数据称...
分类:
其他好文 时间:
2015-01-22 15:37:29
阅读次数:
247
//限制输入的是数字
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
return [self validateNumber:string];
}
- (BOOL)v...
分类:
其他好文 时间:
2015-01-22 15:28:46
阅读次数:
80
Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135",return ["25...
分类:
其他好文 时间:
2015-01-22 15:21:34
阅读次数:
108
直接上代码: 1 String zipfilename = "test.zip"; 2 File zipfile = new File(zipfilename); 3 org.apache.tools.ant.types.Fil...
分类:
Web程序 时间:
2015-01-22 15:14:46
阅读次数:
195
原题地址两个字符串满足什么条件才称得上是scramble的呢?如果s1和s2的长度等于1,显然只有s1=s2时才是scramble关系。如果s1和s2的长度大于1,那么就对s1和s2进行分割,划分成两个子问题分别处理。如何分割呢?当然不能任意分割。假设分割后s1变成了s11和s12,s2变成了s21...
分类:
其他好文 时间:
2015-01-22 15:05:02
阅读次数:
132
String.IndexOf String.IndexOf 方法 (Char, Int32, Int32)报告指定字符在此实例中的第一个匹配项的索引。搜索从指定字符位置开始,并检查指定数量的字符位置。String.IndexOf(value, startIndex, count)参数value:要查...
分类:
其他好文 时间:
2015-01-22 15:04:02
阅读次数:
99
private void DeeperDirectory(string path) { FileSystemInfo[] fsi = new DirectoryInfo(path).GetFileSystemInfos(); foreach ...
分类:
其他好文 时间:
2015-01-22 14:56:28
阅读次数:
98
整理了一下PHP中读取文件的几个方法,方便以后查阅。1.fread string fread ( int $handle , int $length ) fread() 从 handle 指向的文件中读取最多 length 个字节。该函数在读取完最多 length 个字节数,或到达 EOF 的时.....
分类:
Web程序 时间:
2015-01-22 14:55:00
阅读次数:
146
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s = “eceba”,T is "ece" which...
分类:
其他好文 时间:
2015-01-22 14:52:17
阅读次数:
134