//JSON 的简单值10nulltrue"fc"//对象表示var box = { name : 'fc', age : 25};//JSON对象表示{ "name" : "fc", "age" : "25"}'{"name" : "fc","age" : "25"}'//...
分类:
Web程序 时间:
2015-07-29 11:48:04
阅读次数:
153
public sealed class Person : System.IComparable {
internal int age;
public int CompareTo(object rhs) {
if (this == rhs) return 0; // 相同
Person other = (Person)rhs; ...
分类:
其他好文 时间:
2015-07-29 10:19:29
阅读次数:
143
背景:比如存在学生选择的CheckBox,希望在CheckBox中同时存储学生的姓名及其所在的城市,比如选择Lily所对应的CheckBox以后,可以获得Lily所在的城市“NewYork”。html代码如下:如上代码,s是一个Stu对象,由ID、Name、City和Age四个字段组成,在html代...
分类:
Web程序 时间:
2015-07-28 22:58:12
阅读次数:
208
JSON:
什么是JSON:
1,json是一种轻量级的数据格式,一般用于数据交互;
2,服务器返回给客户端的数据,一般都是JSON格式或者XML格式(文件下载除外)
JSON的格式很像OC中的字典和数组
{“name” : "jack", "age" : 10}
{"names" : ["jack","rose","jim"]}
标准JSON格式的注意点...
分类:
Web程序 时间:
2015-07-28 18:52:27
阅读次数:
189
第五章
字面量表示法
var person = {
name:"a",
age:10,
5: true // 数值属性名自动转换为字符串
};
“first name”中包含一个空格,所以不能使用点表示法来访问它,但是可以person[“first name”]
数组的每一项可以保存任何类型的数据
var c = new Array(20); // 长度为20
var c =...
分类:
编程语言 时间:
2015-07-28 18:33:00
阅读次数:
122
OC中方法:- (void)sayWhat:(NSString *)name andAge:(NSString *)age{ NSLog(@"%@,%@",name,age);}Swift中调用:someone.sayWhat("achao",andAge:"22")
分类:
编程语言 时间:
2015-07-28 17:48:20
阅读次数:
87
parse用于从一个字符串中解析出json对象var str = '{"name":"huangxiaojian","age":"23"}'结果:JSON.parse(str)Objectage:"23"name:"huangxiaojian"__proto__:Object注意:单引号写在{}外,...
分类:
Web程序 时间:
2015-07-28 12:20:40
阅读次数:
124
Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want ...
分类:
其他好文 时间:
2015-07-28 10:32:51
阅读次数:
104
无标题文档
//js面向对象:创建一个猫类
function Cat(){
}
//js对象的属性可以动态的添加
var cat1=new Cat();
cat1.name="tom";
cat1.age=3;
cat1.color="白色";
document.write(cat1.name+"--"+cat1.age+"--"+cat1.color);
//js中自...
分类:
编程语言 时间:
2015-07-28 06:44:24
阅读次数:
137
Invitation Cards
Time Limit: 8000MS
Memory Limit: 262144K
Total Submissions: 21615
Accepted: 7089
Description
In the age of television, not many people attend theater p...
分类:
其他好文 时间:
2015-07-28 06:42:48
阅读次数:
112