Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ![]() Interested in joining? Click here. If you are already a member of ZBCode, feel free to login right here: |
- Pages:
- 1
- 2
| First steps of Javascript | |
|---|---|
| Tweet Topic Started: Feb 5 2009, 06:14 AM (527 Views) | |
| Leonardo | Feb 5 2009, 06:14 AM Post #1 |
|
Peter Griffin
![]()
|
Hello I've been meaning to learn Javascript for a while now but never really got into because I would always get stuck and drop it. I have knowledge of HTML and CSS, which I believe would come in handy with JS. So what should I learn first to build my knowledge of JS? Shall we take baby steps? :rolleye: Thanks |
![]() | |
![]() |
|
| HolySavior | Feb 5 2009, 12:14 PM Post #2 |
![]()
Modifying The World Around You
![]()
|
http://zbcode.com/topic/1069406/1/ there is a nice post where to begin |
![]() |
|
| Vitality | Feb 5 2009, 09:36 PM Post #3 |
|
Tabula Rasa
![]()
|
I would also recommend HolySvavior's blog. |
![]() |
|
|
|
Feb 6 2009, 02:39 AM Post #4 |
|
I'm thinkn, maybe you should rename that topic and pin it.. just browsing, there's no signs that there's a bad ass tutorial contained within |
![]() |
|
| Leonardo | Feb 6 2009, 07:00 AM Post #5 |
|
Peter Griffin
![]()
|
Thanks Dan and Vitality. I've got a question, you know how you said we use document.getElementByID(), is there one for classes instead of IDs or can you place classes into that as well? |
![]() | |
![]() |
|
| HolySavior | Feb 6 2009, 02:09 PM Post #6 |
![]()
Modifying The World Around You
![]()
|
in Jsavascript there none like closest thing is document.getElementsByClassName ==" something" normally thats used in an IF statment mainly because class names are used differently than IDs |
![]() |
|
| Leonardo | Feb 6 2009, 05:47 PM Post #7 |
|
Peter Griffin
![]()
|
I see but why do you have two equal signs? I sometimes see 3 as well. |
![]() | |
![]() |
|
| Vitality | Feb 7 2009, 08:45 AM Post #8 |
|
Tabula Rasa
![]()
|
Well having two equal signs will say "equal to" and having three will say "exactly equal to". Another way of matching something is using the .match() method. It's actually very easy to use.
What that is saying is if the location of the address (the url) matches what you've put in the .match() parenthesis, then it will execute your code. You would not include the entire url so this could work for any url containing your match. You can use this with matching text as well, and so on. Edited by Vitality, Feb 7 2009, 08:46 AM.
|
![]() |
|
| Everafter | May 19 2009, 04:11 AM Post #9 |
![]()
|
Im finding this a little frustrating. I look at prebuilt code and then go back and say okay I get this and understand that, then get confused again as I start to play with it on my own. * sighs * I am seriously too new to understand programing. I really should just take a real class slong with my electronics classes I should amend this a little bit. Its not really the coding that is confusing, its the extra symbols and remembering what does what and figuring out, what goes with what to do what I want. Edited by Everafter, May 19 2009, 04:20 AM.
|
![]() |
|
| Reid | May 19 2009, 07:25 AM Post #10 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
Yeah, the operators tend to be the most important things in JavaScript, too bad they're also the most vague. Just remember these, as they are the most important: ++ (raises the current variable by 1) - syntax: z++; -- (lowers the current variable by 1) - syntax: z--; && (logical AND) - syntax: if (a && b) { do something } || (logical OR) - syntax: if (a || b) { do something } < (less than) > (greater than) == (equals) - if (a == 'Hello World') { do something } != (does not equal) if (a != 'Hello World') { do something} Those are the most important, I think. There also is an immensely useful mini-if statement... (condition?what to do if it's true:what to do if it's false) So you could have a ? alert(a) : alert('a does not exist!'); Then if a exists, it will alert what it says. If it doesn't, it will give an alert that says "a does not exist!" Those are the most important, I think. Of course, there are more operators, but there are some you won't ever use.. I never use the bitwise stuff, for example.
|
| The Resource Board | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Code University · Next Topic » |
- Pages:
- 1
- 2


















7:46 PM Jul 10