Welcome To Snipplr


Everyone's Recent JavaScript Snippets



0 302 posted 15 years ago by Corhol
mran( float minimum_number , float maximum_number) (returns int)
1 238 posted 15 years ago by mouseit101
Manejar argumentos y variables recibidas en JavaScript
1 258 posted 15 years ago by Navegante
Resize a Popup to Fit an Image's Size By Peter Todorov February 10th 2003 Reader Rating: 9.1 If you're a Webmaster who has to deal with image galleries, then make a note of this clever script. It gives you a solution to a very common problem --...
1 452 posted 15 years ago by zensir
Solo funciona para IE
5 348 posted 15 years ago by aurele
If you want your pages to be valid XHTML-Strict, but you also wish to open external links in new window, the following snippet is doing just that—sets attribute target=“_blank” to all external links in a document to keep your code valid XHTML-S...
2 436 posted 15 years ago by zensir
Using CSS is, of course, the preferred method of performing mouseover image swapping, but it's good to have a few tricks up your sleeve. Here's one way of doing it with JS, but the images have to be pre-loaded, or else there'll be a slight lag in the...
1 250 posted 15 years ago by pckujawa
Copy the code below and place it in anywhere in your HTML code
3 390 posted 15 years ago by yuconner
1 353 posted 15 years ago by sondosia
added to the head section of the page
5 371 posted 15 years ago by gux
3 294 posted 15 years ago by Corhol
Simple javascript email validation
29 1731 posted 15 years ago by arcturus
Read a page's GET URL variables and return them as an associative array. ---- Example for URL http://www.example.com/index.html?hello=bonjour&goodevening=bonsoir var hash = getUrlVars(); alert(hash['hello']); // prints 'bonjour' alert(hash...
35 2861 posted 15 years ago by Roshambo
Simple templating for innerHTML functions. Parses an input string (tmpl) for %(NAME) tokens, accepts an object (ns) as data and returns an output string.
1 282 posted 15 years ago by mattgay
The ideal use of this code would be to save the Javascript code as a .js file. Then use the HTML code at the bottom to call it wherever you want on the web page.
1 359 posted 15 years ago by Jaymoon
0 372 posted 15 years ago by leoh
2 424 posted 15 years ago by cochambre
Usefull Regular Expressions enhancement. Simplifies standard string operations escaping special chars. And also saves precompiled REs for a speed increase.
1 351 posted 15 years ago by cochambre
3 392 posted 15 years ago by cochambre
guardar como flash.js
0 336 posted 15 years ago by kanirasta
redirects a splash page if visited before. Number of days until expiry can be set
0 326 posted 15 years ago by markhope
Redirect a splash page using javascript. This snippet allows one redirect per session making the backwards navigation possible using the back button.
0 361 posted 15 years ago by markhope
Support: Fx2, Opera9, IE6 I don't have warrant of Safari's run and NN4. However, I think that this code is perhaps safe.
3 293 posted 15 years ago by kif