In the context of AJAX or Protype JavaScript framework
(http://www.prototypejs.org), $ is a shortcut for document.getElementById()
function. For example, $('titleTag') means document.getElementById
('titleTag').
For the '$' dollar sign, if what you mean is the '$' in javascript property
name or variable name(javascript allowed them to start with dollar sign),
it maybe the code convention of the author.
Also, '$' will also be used as special character in regular expression:
Hi guys:
thanks for all responses. but i am getting a little bit confused now.
The reason I raise this question is in some examples about ms ajax extesion
programming, I saw some function name like $find $object. But these
functions can not be found among those standard js fuction. I think these
should be some kinds of the code convention for the author?
Or these function is just for ms ajax extension? am i rite about this?
For the prototype javascript. I think it should a different framework than
the ms ajax extension rite?
Yes, for the Microsoft AJAX script library, it has many method or variables
that contains '$' char in their names. This is just the naming convention
as the AJAX library will adopt a namespace naming convention for the class
and variables. e.g.
Sys$Enum$toString
Sys$Component$_setProperties
Sys$UI$DomElement$getLocation
You can download the Microsoft AJAX script library and check the
function/variables defined there: