Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged c



Copy the code below and place it in anywhere in your HTML code
3 2430 posted 19 years ago by yuconner
1 1834 posted 19 years ago by sondosia
added to the head section of the page
5 1979 posted 19 years ago by gux
3 1970 posted 19 years ago by Corhol
Simple javascript email validation
29 13550 posted 19 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 16300 posted 19 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 1677 posted 19 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 2048 posted 19 years ago by Jaymoon
0 3178 posted 19 years ago by leoh
2 2271 posted 19 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 1914 posted 19 years ago by cochambre
3 2178 posted 20 years ago by cochambre
guardar como flash.js
0 1993 posted 20 years ago by kanirasta
redirects a splash page if visited before. Number of days until expiry can be set
0 1729 posted 20 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 1919 posted 20 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 1890 posted 20 years ago by kif
function prints a serie of random numbers but without the next one being the same as the previous. to print, just call the function in the body
1 1942 posted 20 years ago by dandyna
This little javascript will toggle the div object to create collpse/expand effect on web page. Treat it as a poor man's solution for the TreeView.
0 1711 posted 20 years ago by chengkai
This function allows an object's property names to be read by using an index. The properties can be accessed like: someobject.propertyNames[0] or someobject.propertyValues[0]. But you first have to make the object's properties available by calling so...
2 2087 posted 20 years ago by rolandog
Constructs an element out of arrays. Using nested arrays translates into nested ChildNodes. Update 2006-07-19: Added documentation (comments). Update 2006-11-25: Reduced the ammount of code needed.
5 2340 posted 20 years ago by rolandog
3 1934 posted 20 years ago by masaya
1 1590 posted 20 years ago by perelin
// v6.0 SCHMOE Mod v.2: // switches between (display:'block';) and (display:'none';) // bsp: MM_SCHMOE_showHideLayers('swissmap');
0 1597 posted 20 years ago by perelin
This is test script of Google Map API. How to use this script is as follows. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <style type="text/css"> v\:* { behavior:url(#default#VML)...
5 2150 posted 20 years ago by tomute