JavaScript is the scripting language of the Web.
JavaScript is used in millions of Web pages to add functionality, validate forms, detect browsers, and much more.
JavaScript is used in millions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more.
JavaScript is the most popular scripting language on the Internet and works in all major browsers, such as:
Internet Explorer
Mozilla Firefox
Opera
Note: Java and JavaScript are two completely different languages in both concept and design!
Java (developed by Sun Microsystems) is a powerful and much more complex programming language, similar to C and C++.
JavaScript gives HTML designers a programming tool – HTML authors are normally not programmers, but JavaScript has a simple syntax, making it accessible to anyone who wants to add interactivity.
JavaScript can put dynamic text into an HTML page – Example:
document.write("<h1>" + name + "</h1>");
This can write variable text into an HTML page.
JavaScript can react to events – A script can execute when something happens, like when a page finishes loading or when a user clicks an element.
JavaScript can read and write HTML elements – It can dynamically update content on a webpage.
JavaScript can validate form data – It can check form inputs before submitting data to the server, reducing server-side processing.
JavaScript can detect the visitor's browser – It can load different pages based on the visitor's browser.
JavaScript can create cookies – It can store and retrieve information on the visitor's computer.
To mark this module as complete, you must finish this quiz. Once submitted, you'll need to wait 2 hours before attempting it again.