background preloader

JavaScript

Facebook Twitter

JavaScript Reference (beta) Intro. Javascript--what the heck is it? Is it a really difficult programming language that casual web designers should be afraid of? What is it used for? Hopefully we'll be able to answer these questions for you and more in this tutorial JavaScript has been around for several years now, in many different flavors. By definition, JavaScript is a client-side scripting language. There are many uses (and abuses!) 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 Before you begin this tutorial, you should have basic knowledge of HTML. This tutorial will cover the basics of JavaScript, from where to place your JavaScript all the way to making your own JavaScript functions. We recommend that you read a few lessons a day and practice what you have learned. Report a Bug or Comment on This Lesson - Your input is what keeps Tizag improving with time!

Closure Tools - Google Code. The Closure Tools project is an effort by Google engineers to open source the tools used in many of Google's sites and web applications for use by the wider Web development community. Web applications have evolved from simple HTML pages into rich, interactive applications that provide a great user experience. Today's web apps pose a challenge for developers, however: how do you create and maintain efficient JavaScript code that downloads quickly and works across different browsers? The Closure tools help developers to build rich web applications with web development tools that are both powerful and efficient. The Closure tools include: A JavaScript optimizer The Closure Compiler compiles JavaScript into compact, high-performance code. A comprehensive JavaScript library The Closure Library is a broad, well-tested, modular, and cross-browser JavaScript library.

The Closure Library is server-agnostic, and is intended for use with the Closure Compiler. An enhanced stylesheet language. MooTools - a compact javascript framework. Unpack Javascript - Strictly Software. Document.getElementsByClassName = function(clsName){ var retVal = new Array(); var elements = document.getElementsByTagName("*"); for(var i = 0;i < elements.length;i++){ if(elements[i].className.indexOf(" ") >= 0){ var classes = elements[i].className.split(" "); for(var j = 0;j < classes.length;j++){ if(classes[j] == clsName){retVal.push(elements[i]);} } } else if(elements[i].className == clsName){ retVal.push(elements[i]); } } return retVal; } When run through Dean Edwards packer code with all options enabled so that excess space is removed and variables shortened comes out like this: eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!

''. The reasons for this will be to reduce the size of the original Javascript code as well as make it harder for someone to work out what is going on and to steal it. A more legitamite reason for wanting to unpack compressed code is when your unsure whether the scripts being loaded on a site are malicious or not. Using Javascript.