Javascript Code Snippets
(20)
put this where you put html
replace 'background' with the background color of your site,
replace 'link' with the link you want it to go to, replace 'cmts' with the color you want the text to be when..
+ 0 likes
Weasel's first javascript! on your website it pops up an alert with a response depending on the time!
put it where you'd put html/javascript!
Tags:
popup
+ 0 likes
This snippet changes the color of an element which is selected from a list when called (OR it can change the color of an object to a specified color).
+ 0 likes
This is a simple Javascript snippet that lets you toggle a group of checkboxes on or off at the same time. This is the format for your HTML form:
You can use this in multiple groups on the same..
+ 0 likes
This is a code that will disable highlighting on a web page. Copy and paste this wherever you want on your web page. It is JavaScript. :)
+ 0 likes
This, is my first attempt of doing some javascript..
so there may be errors, but it does work!
Put the first part, into a php, or html file, etc
the second part, just needs to be put in a "clock.js"..
+ 0 likes
I find that lots of people new to AJAX can't get the grips because they don't understand the XMLHttpRequest, below is a help to that - this will handle the request, all that you have to fill in is the..
+ 0 likes
This is a very simple Javascript toggle that'll show or hide a div depending on its current state. Here is the HTML code:
+ 1 likes
Script is relatively simple, credit should be shown to several tutorials, particularly those on AJAX in www.w3schools.com I HAVE used my own work though :-)
What I find I love about AJAX is that..
+ 1 likes
+ 0 likes
Simple redirect, if you go to URL "REDIRECT FROM", you will be redirected to "REDIRECT TO".
For example, if I move domain name, I could put in the homepage of my old domain (e.g...
+ 0 likes
I used this function on my latest website, found it came in handy and looked real nice;
Put this into any html page, the put this code for the bit that's to be toggled;
This is REALLY effective..
+ 0 likes
pretty straight forward. Get the code, save it in a filename.html then run it. Hover over one of the sites named above the horizontal line to get further information below.
This is just to help some..
+ 0 likes
Umm...I'm a bit new to Javascript, this is my first script in it o.0
+ 0 likes
This is my first javascript snippet on here, there are no "errors" as such, but i'm fairly sure i've done it in the longest way possible !
+ 0 likes
1. Copy/Paste this code in NotePad
2. Save As... snow.js
3. Upload on your hosting
4. Add this code to your web-site
+ 0 likes
This will copy the text in a given field to the clipboard. Unfortunately it only works in IE, so Firefox users will still need to do the actual copy. But it'll at least select the text for Firefox users.
Here..
+ 0 likes




