javascript get find 方法
来源:互联网 发布:近年来 网络爱国事件 编辑:程序博客网 时间:2024/05/17 01:16
$get Shortcut Method
Provides a shortcut to the getElementById method of the Sys.UI.DomElement class. This member is static and can be invoked without creating an instance of the class.
Syntax
Term |
Definition |
---|---|
id | The ID of the DOM element to find. |
element | The parent element to search. The default is the document element. |
Example
The following example shows how to use the $get method. This code is part of a larger example found in the DomElement class overview.
cs
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);
--------------------------------------
- // 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);
$find Shortcut Method
Provides a shortcut to the findComponent method of the Sys.Application class. This member is static and can be invoked without creating an instance of the class.
Syntax
Arguments
- var o = $find(id, parent);
- id :
A string that contains the ID of the component to find.
- parent :
(Optional) The component or element that contains the component to find.
Return Value
A Component object that contains the component with the specified ID, if found; otherwise, null.
Remarks
For details about the method that this shortcut represents, see findComponent Method.
Example
The following example uses the $find method to check whether a custom component exists and to notify the user if the component is missing.
CS
- function checkComponent() {
- if (!($find('MyComponent', div1))) {
- div1.innerHTML = 'MyComponent is not available.';
- }
- }
- javascript get find 方法
- 【问题记录】使用getHibernateTemplate().find()方法的get(index)方法
- javascript 获取GET方法的参数
- Javascript-ajax的get/post方法
- JavaScript中set与get方法用法
- hibernate get load find
- aspx $get和$find
- 03、eq、get、find
- 用JavaScript获取url中的get参数的方法
- jquery中get和find方法区别,对象与标签元素的互换
- find方法
- find方法
- Hibernate load(), get() , find() 区别
- ASP.NET AJAX $get () $find()
- get方法
- get方法
- get方法
- get方法
- [经济杂谈]经济危机的真相
- 好冷哦
- 26种 money
- 浑天码部件代码表
- dbms_monitor.session_trace_enable 跟踪某个会话
- javascript get find 方法
- java中递归遍历寻找一个文件,并找出的它的全路径
- 如何用SQLDMO在ASP.NET页面下实现数据库的备份与恢复
- 此类中封装一些常用的字符串操作(和业务无关)。
- 文件系统过滤驱动基础知识
- 大型互联网网站架构心得
- 简单配置-让mysql被其他机器远程调用
- job调用下面的过程
- Windows文件系统驱动程序编程相关链接