什么是$之间的区别,并获得$发现在JavaScript中? [英] What's the difference between $get and $find in JavaScript?
问题描述
我是谁才刚刚开始了解客户端脚本一个.NET程序员,我在想,有时你使用 $ GET('值')
和 $找到('值')
键,我发现,这些只是为的document.getElementById('值')$ C快捷键$ C>和<一个href=\"http://msdn.microsoft.com/en-us/library/bb397522%28loband%29.aspx\"><$c$c>Sys.Application.findComponent('value')$c$c>,分别。
I'm a .NET programmer who've just started to learn more about client side scripting, and I was wondering sometimes you use $get('value')
and $find('value')
and I've discovered that these are just shortcuts for document.getElementById('value')
and Sys.Application.findComponent('value')
, respectively.
不过,我还是不明白:什么是JavaScript中这两个函数之间的区别?究竟什么是调用时查找/检索?
However, I still don't understand: what is the difference between these two functions in JavaScript? What exactly are they looking up/retrieving when invoked?
先谢谢了。
推荐答案
$ GET
&安培; $找到
的快捷功能微软已经内置到他们的Ajax JavaScript库。
$get
& $find
are shortcut functions Microsoft has built into their Ajax JavaScript Library.
$ GET
是短期的标准JavaScript 的getElementById
功能。 $找到
是短期的。NET的<一个href=\"http://www.asp.net/ajax/documentation/live/clientreference/Sys/ApplicationClass/SysApplicationFindComponentMethod.aspx\"><$c$c>findComponent()$c$c>功能。这不是一个标准的JavaScript功能,是专门针对微软的Ajax JavaScript库。
$get
is short for the standard JavaScript GetElementById
function. $find
is short for .Net's findComponent()
function. This is not a standard JavaScript function and is specific to Microsoft's Ajax JavaScript library.
马特Berseth做的分歧和放一个伟大的写了;用法<一个href=\"http://web.archive.org/web/20100212204840/http://mattberseth.com/blog/2007/08/the_everuseful_get_and_find_as.html\">here.
Matt Berseth does a great write up of the differences & usages here.
这篇关于什么是$之间的区别,并获得$发现在JavaScript中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!