level 5
asp.net ajax对javascript对象的扩展
2008年09月25日 06点09分
9
level 5
在asp.net ajax框架中,命名空间、类、继承、接口、枚举的实现方法:[注意]把**防删符**替换为函数的英文。------------------------------//声明命名空间Type.registerNamespace("Test");//Animal类的字段Test.Animal = **防删符**(name) { this._name = name;}//Animal类的方法Test.Animal.prototype = { get_Name: **防删符**() { return this._name; }, set_Name: **防删符**() { return this._name; }, eat: **防删符**() { Sys.Debug.trace("Animal eats."); }}//注册Test.Animal类Test.Animal.registerClass("Test.Animal");//声明子类FishTest.Fish = **防删符**(name) { //初始化父类 Test.Fish.initializeBase(this, [name]);}Test.Fish.prototype = { eat: **防删符**() { Sys.Debug.trace("Fish eat"); }}//注册Test.Fish类Test.Fish.registerClass("Test.Fish", Test.Animal);//声明接口InterfaceTest.IRunnable = **防删符**() { }Test.IRunnable.prototype = { run: **防删符**() { }}Test.IRunnable.registerInterface("Test.IRunnable");//Dog类实现了Test.IRunnable接口Test.Dog = **防删符**(name) { Test.Dog.initializeBase(this, [name]);}Test.Dog.prototype = { eat: **防删符**() { Sys.Debug.trace("Dog eats."); }, run: **防删符**() { Sys.Debug.trace("Dog running."); }}Test.Dog.registerClass("Test.Dog", Test.Animal, Test.IRunnable);//声明一个枚举Test.Position = **防删符**() { };Test.Position.prototype = { Center:0, Top: 1, Bottom: 2, Left: 3, Right:4}Test.Position.registerEnum("Test.Position");
2008年09月25日 11点09分
10
level 5
toSource()方法
toString()方法
valueOf()方法
constructor属性
prototype属性
Math 对象
Math 对象参考
abs()方法
acos()方法
asin()方法
atan()和atan2()方法
ceil()方法
cos()方法
exp()方法
floor()方法
log()方法
max()方法
min()方法
pow()方法
random()方法
round()方法
sin()方法
sqrt()方法
tan()方法
toSource()方法
valueOf()方法
constructor属性
prototype属性
HTML DOM
DOM Anchor
accessKey 属性
charset属性
coords属性
href 属性
hreflang属性
id属性
innerHTML 属性
name属性
rel属性
rev属性
shape属性
tabIndex属性
target 属性
type属性
className属性
dir属性
lang属性
title属性
blur() 方法
focus() 方法
DOM Applet
DOM Area
[area]accessKey属性
[area]alt属性
[area]coords属性
[area]hash属性
[area]host属性
[area]href属性
[area]id属性
[area]noHref属性
[area]pathname属性
[area]protocol属性
[area]search属性
[area]shape属性
[area]tabIndex属性
[area]target属性
[area]className属性
[area]dir属性
[area]lang属性
[area]title属性
[DOM]Base 对象
[base]href属性
[base]id属性
[base]target属性
[DOM]Basefont对象
[DOM]Body 对象
[body]className属性
[body]dir属性
[body]id属性
[body]lang属性
[body]title属性
[DOM]Button对象
[button]accessKey属性
[button]disable属性
[button]form属性
[button]id属性
[button]name属性
[button]tabIndex属性
[button]type属性
[button]value属性
[button]className属性
[button]dir属性
[button]lang属性
[button]title属性
[button]blur()方法
[button]click()方法
[button]focus()方法
[DOM]Checkbox
[Checkbox]accessKey属性
[Checkbox]alt属性
[Checkbox]checked 属性
[Checkbox]defaultChecked属性
[Checkbox]disabled属性
[Checkbox]form属性
[Checkbox]id属性
[Checkbox]name属性
[Checkbox]tabIndex属性
[Checkbox]type属性
[Checkbox]className属性
[Checkbox]dir属性
[Checkbox]lang属性
[Checkbox]title属性
[Checkbox]blur()方法
[Checkbox]click()方法
[Checkbox]focus()方法
[DOM]Document 对象
[document]anchors 集合
[document]forms 集合
[document]images 集合
[document]domain 属性
[document]referrer 属性
[document]title 属性
[document]URL 属性
[document]close() 方法
[document]getElementById() 方法
[document]open() 方法
[document]write() 方法
DOM 事件
[DOM]File 对象
[DOM]Form 对象
[Form]elements 集合
[Form]acceptCharset属性
[Form]action属性
[Form]enctype 属性
[Form]id 属性
[Form]length 属性
[Form]method 属性
[Form]name 属性
[Form]target 属性
[Form]reset() 方法
[Form]submit() 方法
[DOM]Frame 对象
[Frame]noResize属性
[Frame]scrolling属性
[Frame]src属性
[DOM]Frameset 对象
[DOM]Hidden对象
[DOM]History 对象
[DOM]Iframe 对象
[Iframe]src 属性
[DOM]Image 对象
[Image]align属性
[Image]alt属性
2009年12月23日 07点12分
26