HTML and CSS Reference
In-Depth Information
The following workshop includes questions, a quiz, and exercises related to JavaScript.
Q Don't I need a development environment to work with JavaScript?
A Nope. As with HTML, all you need is a text editor and a browser that supports
JavaScript. You might be confusing JavaScript with Java, a more comprehensive
programming language that needs at least a compiler for its programs to run.
However, tools like FireBug for Firefox, the Internet Explorer Developer Toolbar,
and Safari's Web Inspector can make your life easier. Consult the documentation
on those tools to learn more about their JavaScript features.
Q What is AJAX?
A One topic we haven't covered yet is AJAX. AJAX is a term used to describe scripts
that communicate with the server without requiring a web page to be fully
reloaded. For example, you can use it to fetch information and display it on the
page, or to submit a form for processing, all without changing the full page in the
browser. I discuss AJAX in detail in Lesson 16.
Q When I use JavaScript, do I need to accommodate users whose browsers may
not support JavaScript or who have disabled it?
A Some estimates indicate that more than 90% of web users have JavaScript enabled.
However, unless you have a really good reason not to, you should make accommo-
dations for users without JavaScript. You need not offer users who don't have
JavaScript an identical experience to those who have it, but they should be able to
access your site. For example, if you run an online store, do you really want to shut
out users because of their browser configuration?
Q In Java and C++, I previously defined variables with statements such as int ,
char , and String . Why can't I do this in JavaScript?
A As I mentioned previously, JavaScript is a loosely typed language. This means that
all variables can take any form and can even be changed on-the-fly. As a result, the
context in which the variable is used determines its type.
1. What HTML tag is used to embed JavaScript scripts in a page?
2. What are events ? What can JavaScript do with them?
Search WWH ::

Custom Search