473,473 Members | 1,488 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

what $ means in the javascript

i found some example js. the character $ has been used a lot. What's that
mean? can someone give me some reference on that?

Thanks
Apr 23 '07 #1
6 1602
It's part of regex but it might be used in the name of a function or
variable. Variables names can begin with a character, $ or an
underscore.

On Apr 22, 9:45 pm, "Victor" <vic...@noemail.noemailwrote:
i found some example js. the character $ has been used a lot. What's that
mean? can someone give me some reference on that?

Thanks

Apr 23 '07 #2
Hello,

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').

Hope this helps?

"Victor" wrote:
i found some example js. the character $ has been used a lot. What's that
mean? can someone give me some reference on that?

Thanks
Apr 23 '07 #3
Hi Victor,

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:

http://www.trans4mind.com/personal_d...lar%20Expressi
ons%20Simple%20Usage.htm

http://www.devguru.com/Technologies/..._special_chara
cters.html

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 23 '07 #4
Hi Victor,

Have you got any further idea on this issue? If you have any further
questions or anything else we can help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 25 '07 #5
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?

cheers
Victor

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:$I**************@TK2MSFTNGHUB02.phx.gbl...
Hi Victor,

Have you got any further idea on this issue? If you have any further
questions or anything else we can help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.

Apr 26 '07 #6
Thanks for your reply Victor,

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:

http://ajax.asp.net/downloads/librar...7&subtabid=471

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 26 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Kim Forbes | last post by:
I am learning Javascript; and most books only give you partial definitions for the functions they show you. Here is a line of code from a browser sniffing function: var isWin =...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
6
by: yong321 | last post by:
With this script <script> alert(8/(3-8/3)) </script> I hope to get 24, but I get 23.99999999999999 in IE 6.0.2800 and Firefox 1.5.0.4. alert(6/(1-3/4)) returns 24 as expected. I see a...
5
by: Cylix | last post by:
this.menus = { root: new Array };
4
by: Java Guy | last post by:
I can find a lot of stuff on the internet about javascript, except how to I determine which version my IE6 is compatible with, or where to download javascript plugin/engine/what-ever for Windows...
9
by: pamelafluente | last post by:
Hi, I was "studying" the famous (public code) BusyBox. I see the instruction: var busyBox = new BusyBox as in var busyBox = new BusyBox("BusyBox1", "busyBox", 4, "gears_ani_", ".gif",...
9
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - What is the document object model? ----------------------------------------------------------------------- ...
6
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have <a href="javascript:somefunction()"what .... ?...
12
by: Marc | last post by:
Comming from JSP-HTML when I hear 'script' I think of JavaScript or perhaps VBScript. But I think in ASP.NET they mean something else? I am bit confused now. Reading a book I see the following:...
93
by: lorlarz | last post by:
Here, let's see what you JavaScript programmers have got Here is a place to share your large or larger full-blown JavaScript applications: real.comp.lang.js.apps (a new google group) Here is...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.