W3Schools

home HOME

JS Basic
JS HOME
JS Introduction
JS How To
JS Where To
JS Variables
JS If...Else
JS Switch
JS Operators
JS Popup Boxes
JS Functions
JS For Loop
JS While Loop
JS Break Loops
JS For...In
JS Events
JS Try...Catch
JS Throw
JS onerror
JS Special Text
JS Guidelines

JS Objects
JS Objects Intro
JS String
JS Date
JS Array
JS Boolean
JS Math
JS HTML DOM

JS Advanced
JS Browser
JS Cookies
JS Validation
JS Animation
JS Image Maps
JS Timing
JS Create Object
JS Summary

Examples/Quiz
JS Examples
JS Object Examples
JS DOM Examples
JS Quiz

JS References
JS Objects
JS HTML DOM

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Forum

Helping W3Schools

pixels

JavaScript Guidelines

previous next

Some other important things to know when scripting with JavaScript. 


JavaScript is Case Sensitive

A function named "myfunction" is not the same as "myFunction" and a variable named "myVar" is not the same as "myvar".

JavaScript is case sensitive - therefore watch your capitalization closely when you create or call variables, objects and functions.


White Space

JavaScript ignores extra spaces. You can add white space to your script to make it more readable. The following lines are equivalent:

name="Hege"
name = "Hege"


Break up a Code Line

You can break up a code line within a text string with a backslash. The example below will be displayed properly:

document.write("Hello \
World!")

However, you cannot break up a code line like this:

document.write \
("Hello World!")


Comments

You can add comments to your script by using two slashes //:

//this is a comment
document.write("Hello World!")

or by using /* and */ (this creates a multi-line comment block):

/* This is a comment
block. It contains
several lines */
document.write("Hello World!")


previous next


What do you want your Web site to do?

Ektron

What do you want your Web site to do? Ektron CMS400.NET lets you do everything you need to do on the Web and do everything you want to do.

Ektron Ektron CMS400.NET gives you all the features you would expect from an enterprise CMS, but also high-demand functionality like real-time Web site analytics, community building, blogging, personalization, and online calendars. Ektron CMS400.NET bridges your Web site gaps.

Use Ektron CMS400.NET for:

  • Content & Document Management - Author/edit content, manage navigation, menus, audit trails, workflow, approvals
  • Personalzation & Portal Support - Allow visitors to create their own view of your web page
  • 508 & W3C Compliance Checker - Ensure compliance with scheduled or on-demand compliance reports
  • Memberships - Build online communties with blogs and forums, enable email web alerts, build polls and surveys
  • Web Site Analytics - track visitors, report on most requested pages, see where they came from and where they are going
  • HTML Form Engine - Create a two-way dialog with visitors using our wizard-like HTML form-building engine with validation and database support
  • Multilingual Support - Integrated translation tools help you reach multiple audiences by speaking their language
  • Online Calendars - Build and manage Web-based calendars and enable users to customize a view based on what’s important to them

See why there are 15,000+ Ektron integrations worldwide.

Click here to learn more, then request a live online demo or download a FREE TRIAL




diploma   

Get Your Diploma!

W3Schools' Online Certification Program is the perfect solution for busy professionals who need to balance work, family, and career building.

The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.

The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.


Jump to: Top of Page or HOME or Printer Friendly Printer friendly page

W3Schools provides material for training only. We do not warrant the correctness of its contents. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2007 by Refsnes Data. All Rights Reserved.

Validate Validate W3C-WAI level A conformance icon W3Schools was converted to XHTML in December 1999
SITE SEARCH
 
About W3Schools
W3Schools Forum
ASPHits
Active Server Pages Resource Web Site
WEB HOSTING
$15 Domain Name
Registration
Save $20 / year!
UK Domain Names
UK Web Hosting

Alojamiento Web
Buy UK Domain Names
Register Domain Names
Cheap Domain Names
Cheap Web Hosting
Best Web Hosting
Bulk Domain Names
UK Web Hosting
PHP MySQL Hosting
Web Hosting UK
Top 10 Web Hosting
Web Hosting Providers
ASP.NET Web Hosting
3 Months Free!
Programming Forums
Windows Web Hosting
WEB BUILDING
XML Website Tools
Website Templates
Flash Templates
Website Builder
Internet Business Opportunity
Custom Programming
BEST Flash Templates
Web Design Forum
Programming Forum
FREE Trial or Demo
Web Content Manager
Forms,Web Alerts,RSS
HTML Exam
SHOPPING
UK Wholesalers
UK Wholesale
ONLINE DEGREE
Advance Your Career
with Drexel University
Bachelor's & Master's
Tech Degrees ONLINE

pixels
Visit Norway
The Ringsdalen, Norway 
Photo: Johan Wildhagen/Innovation Norway
More inspiration at
www.visitnorway.com