|
Javascript, what the heck is it? Is it a really not easy programming language that informal web designers should be afraid of? What is it used for? Hopefully we'll be able to answer these questions for you and more. JavaScript has been around for several years now, in many dissimilar flavors. The main benefit of Javascript is to add additional communication between the web site and its visitors at the cost of a little extra work by the web developer. Javascript allows industrious web masters to get more out of their website than HTML and CSS can provide. By definition, Javascript is a client-side scripting language. This means the web surfer's browser will be running the script. This is differing to client-side is server-side, which occurs in a language like PHP . These PHP scripts are run by the web hosting server. There are many uses (and abuses!) for the powerful Javascript language. Here are a few things that you may or may not have seen in your web surfing days. Clocks Mouse Trailers (an animation that follows your mouse when you surf a site) Drop Down Menus Alert Messages Popup Windows HTML Form Data Validation
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 trendy scripting language on the internet, and works in all major browsers, such as Internet Explorer, Mozilla, Firefox, Netscape, and Opera. What You Should Already Know Before you carry on you should have a basic understanding of the following: HTML / XHTML What is JavaScript? JavaScript was considered to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a unimportant programming language A JavaScript consists of lines of executable computer code A JavaScript is usually entrenched directly into HTML pages JavaScript is an interpreted language (means that scripts execute without preliminary compilation) Everyone can use JavaScript without purchasing a license
Are Java and JavaScript the Same?NO! Java and JavaScript are two entirely different languages in both concept and design! Java (developed by Sun Microsystems) is a powerful and much more complex programming language - in the same category as C and C++. What can a JavaScript Do? JavaScript gives HTML designers a programming tool - HTML authors are usually not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages JavaScript can put dynamic text into an HTML page - A JavaScript statement similar to this: document.write("<h1>" + name + "</h1>") can write a variable text into an HTML page JavaScript can react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element JavaScript can be used to validate data - A JavaScript can be used to authenticate form data before it is submitted to a server. This saves the server from extra processing JavaScript can be used to detect the visitor's browser - A JavaScript can be used to detect the visitor's browser, and - depending on the browser - load another page purposely designed for that browser JavaScript can be used to create cookies - A JavaScript can be used to store and recover information on the visitor's computer
The Real Name is ECMA ScriptJavaScript's official name is "ECMAScript". The standard is industrial and maintained by the ECMA organisation. ECMA-262 is the official JavaScript standard. The standard is based on JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape (with Navigator 2.0), and has appeared in all Netscape and Microsoft browsers since 1996. The development of ECMA-262 started in 1996, and the first edition of was adopted by the ECMA General Assembly in June 1997. The standard was approved as an international ISO (ISO/IEC 16262) standard in 1998. The development of the standard is still in progress This tutorial will cover the basics of Javascript, from where to place your Javascript all the way to making your own Javascript functions. Also there will be some good programming practice tips throughout this tutorial. We recommend that you read a few lessons a day and practice what you have learned. This will help you to absorb the material more willingly than if you blasted through the tutorial in one sitting! JS How to JS Where to JS Statements JS Comments JS Variables JS Operaters JS Comparisons JS IF...Else JS Switch JS Poppup Boxes JS Function JS For Loop JS Whilr Loop JS Break Loop JS For...IN JS Events JS Try... Catch JS Throw JS Onerror JS Special Text JS Guidelines
|