i want to learn javascript but have no experience handcoding it just using a little of it on my website. so is there any good books you might suggest?
Printable View
i want to learn javascript but have no experience handcoding it just using a little of it on my website. so is there any good books you might suggest?
Hi dogdude16, Welcome to SPF!
There are good books available - but I'm not good at suggesting any. Check out SitePoint's books.
But if you want to learn Javascript, you've come to the right place. We are always glad to help people who want to learn :). Feel free to ask any questions whatsoever.
Do you have experience with any other programming language?
I suggest you start browsing the Javascript Reference. Don't worry about memorizing it - don't try to make yourself learn - just browse the ref out of curiosity. Read more about things that catch your interest, read less about things that don't. Eventually you'll know the ref like the back of your hand :)
Copy and paste some of the examples from the ref and experiment with them. Just let us know of a certain language feature you're interested in and we'll provide a basic template which makes use of that feature, then you can experiment with it.
thanks for linking to the reference, ill make sure to browse it. i do not have experience with any programming language. i have used some free javascripts before but not code them my self.
Here's a handy template. I don't use this for actual web pages (altho you could) but it is perfect for doing quick experiments on your local machine.
Javascript is a scripting language independent from the browser. You'll find Javascript used as a scripting language in products other than web browsers. When you look at the Javascript reference you will not see much about web pages. The Javascript engine gives us access to objects and functions such as the Math object, the Date object, the String object, the Array object, etc. These objects will be available even if the Javascript engine is not running in a browser.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Template</title>
<style type='text/css'>
</style>
<script type='text/javascript'>
window.onload = function()
{
}
</script>
</head>
<body>
</body>
</html>
But, as you know, we can also use Javascript to change properties of HTML elements. That is because the browser gives the Javascript engine access to those HTML element objects. The browser gives the Javascript engine access to what is called the Document Object Model. And now you have another reference to study: the DOM.
In the template I've posted above, what am I doing with "window"? Is window provided to us by the Javascript engine or by the browser? It is part of the browser instead of the Javascript engine. And so you would go to the DOM reference to find out more about the window object. Likewise if I wanted to learn about what properties are available (and the methods for manipulating them) for some HTML element then I would go to the DOM reference because HTML elements are part of the web page - part of the document object hierarchy. If I needed a reminder on how to convert a string to lowercase, or how to make a loop that goes through an array and does something with each thing in the array then I would go to the Javascript reference.
My point here is that "learning Javascript" in the context of a web browser means more than just learning Javascript. I'm not trying to make it harder - but I think having a general feel for this distinction will make some things easier on you.
Ok, enough of that :)
So now I have some questions for you. Use the Javascript reference (or any other resource) to find the answers.
1. What is the basic meaning of the terms "syntax" and "semantics"?
2. What is an "identifier" or "variable"?
3. What is an "expression" and what does it mean to "evaluate" an expression?
4. What is a Javascript "statement" - what is its syntax?
:)
i am ready to learn javascript and making my way to the bookstore soon so if there still is a good book you know of, please suggest one.
Jeremy Keith's DOM Scripting book (http://www.amazon.com/DOM-Scripting-...4507955&sr=8-1) is a good start.
Sitepoint's Javascript Anthology is a nice followup read :)
Javascript: A Beginner's Guide