JavaScript Snippets
From JumbaWiki
Here you will find a list of useful JavaScript Code Snippets that have been found invaluable by the Jumba community. Feel free to use them and make appropriate mention to sources.
JavaScript Basics
- For more information, see main article: JavaScript Basics
Before getting to deep into code and snippets, it might be worth learning some of the core syntax and setup of JavaScript. This will get you comfortable with a whole range of things from variables, arrays, functions, if statements and standard programming syntax.
Here are some basic scripts to get you started. From here you can venture into the more advanced scripts.
- JavaScript Alert (alert, confirm, prompt)
- JavaScript Empty link
- JavaScript Window Actions (Close a window, Move to point, Resize browser window, popup window)
- JavaScript Browser functions (History Navigation, add to homepage)
Other JavaScript Snippets
These "snippets" or guides assume a fairly good knowledge of HTML and JavaScript and doesn't explain each element in large detail.
- Form validation
- Activate control - Remove that annoying ActiveX control tooltip - "Click to activate and use this control"
- JavaScript SHA1 hashes
- Simple calculator scripts
- Hide mailto - hide mailto links from robots
- CSS style switcher - Automatically change the website style without page refresh
See also
| Code Snippets |
|---|
| ActionScript | ASP | ASP.NET | CGI | ColdFusion | CSS | HTML | Java | JavaScript | JSP | MySQL | PHP | Perl | XML | XHTML |

