乱世重典

--得天道之垂青 破地道之迂腐 尽人道灵性 

翻译 Ms Ajax Lib-> $get 方法收藏

新一篇: Ms Ajax Lib-> $addHandler方法 | 旧一篇: Hanoi塔问题(C)

Sys.UI.DomElement $get 方法

提供了一个Sys.UI.DomElement类中getElementById方法的快捷访问方式。静态成员,无须实例化即可使用。

语法

$get(id, element);

参数

描述

id

要寻找的元素的ID。

element

要寻找的父元素,默认为document。

以下示例给出了如何用 $get 方法。本示例及方法同样属于 DomElement 类综述结点.

cs

// Add handler using the getElementById method
$addHandler(Sys.UI.DomElement.getElementById("Button1"), "click", toggleCssClassMethod);
// Add handler using the shortcut to the getElementById method
$addHandler($get("Button2"), "click", removeCssClassMethod);

vb

// Add handler using the getElementById method
$addHandler(Sys.UI.DomElement.getElementById("Button1"), "click", toggleCssClassMethod);
// Add handler using the shortcut to the getElementById method
$addHandler($get("Button2"), "click", removeCssClassMethod);

 

发表于 @ 2007年03月02日 18:50:00|评论(loading...)|收藏

新一篇: Ms Ajax Lib-> $addHandler方法 | 旧一篇: Hanoi塔问题(C)

评论:没有评论。

发表评论  


当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
Csdn Blog version 3.1a
Copyright © 重典