Highlights All Snippets Top 100 Snippets Librarians gbCodeLib
By Language VB6 JavaScript Perl HTML SQL Java DOS
The first category of consists of mini-tutorials for the language, followed by categories of source code snippets. Click on a title to see the source code.
The source code is organized into the following categories:
_tutorials 01 Overview 02 Sample Code 03 IDE 04 Syntax 05 Data types / variables 06 Operators 07 Boolean logic 08 Strings 09 Arrays 10 Conditional flow 11 Scope 12 Functions 13 Files / Folders 14 System functions 15 Graphics 16 Sound 17 Date-Time 18 Math 19 Printing 20 Error handling 21 Databases 22 Objects 23 Browser Object Model 24 Objects - built-in 25 Event handlers 26 Cascading Style Sheets (CSS) I - Basics 27 Cascading Style Sheets (CSS) II - Inline/External Styles 28 Cascading Style Sheets (CSS) III - Properties 29 CGI data transmission 30 Summary of functions 31 Distribution 32 Dynamic HTML 33 Cookies 34 Java applets Top 100 Snippets cookies Create expiration date Delete cookie Determine if cookies are turned off Read a cookie Write a cookie date-time Calendar - 3-month rolling Calendar - daily Calendar - monthly Calendar - year Clock - in a button Clock - military time Create new date variable Display date-time on a web page + updates Last date page was modified Set time limit on New links Show date-tme, 5 formats Time at site Time remaining World Clock dialog Ask for password Display message when form loads Get value from user Popup window Printer dialog email Email button Send URL to friend error handling 404 referrer Custom error handler function Script debugger finance Compound interest Loan calculations Sort checks forms Auto-find in list Cancel form submission Check all checkboxes Check for numeric values Check for spaces in text field Date selection Email validation Email-birthday validation Email-URL validation Plus-minus buttons Popup help Prevent user from changing value of element Swap items between lists graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
cookies Create expiration date Delete cookie Determine if cookies are turned off Read a cookie Write a cookie date-time Calendar - 3-month rolling Calendar - daily Calendar - monthly Calendar - year Clock - in a button Clock - military time Create new date variable Display date-time on a web page + updates Last date page was modified Set time limit on New links Show date-tme, 5 formats Time at site Time remaining World Clock dialog Ask for password Display message when form loads Get value from user Popup window Printer dialog email Email button Send URL to friend error handling 404 referrer Custom error handler function Script debugger finance Compound interest Loan calculations Sort checks forms Auto-find in list Cancel form submission Check all checkboxes Check for numeric values Check for spaces in text field Date selection Email validation Email-birthday validation Email-URL validation Plus-minus buttons Popup help Prevent user from changing value of element Swap items between lists graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
date-time Calendar - 3-month rolling Calendar - daily Calendar - monthly Calendar - year Clock - in a button Clock - military time Create new date variable Display date-time on a web page + updates Last date page was modified Set time limit on New links Show date-tme, 5 formats Time at site Time remaining World Clock dialog Ask for password Display message when form loads Get value from user Popup window Printer dialog email Email button Send URL to friend error handling 404 referrer Custom error handler function Script debugger finance Compound interest Loan calculations Sort checks forms Auto-find in list Cancel form submission Check all checkboxes Check for numeric values Check for spaces in text field Date selection Email validation Email-birthday validation Email-URL validation Plus-minus buttons Popup help Prevent user from changing value of element Swap items between lists graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
dialog Ask for password Display message when form loads Get value from user Popup window Printer dialog email Email button Send URL to friend error handling 404 referrer Custom error handler function Script debugger finance Compound interest Loan calculations Sort checks forms Auto-find in list Cancel form submission Check all checkboxes Check for numeric values Check for spaces in text field Date selection Email validation Email-birthday validation Email-URL validation Plus-minus buttons Popup help Prevent user from changing value of element Swap items between lists graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
email Email button Send URL to friend error handling 404 referrer Custom error handler function Script debugger finance Compound interest Loan calculations Sort checks forms Auto-find in list Cancel form submission Check all checkboxes Check for numeric values Check for spaces in text field Date selection Email validation Email-birthday validation Email-URL validation Plus-minus buttons Popup help Prevent user from changing value of element Swap items between lists graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
error handling 404 referrer Custom error handler function Script debugger finance Compound interest Loan calculations Sort checks forms Auto-find in list Cancel form submission Check all checkboxes Check for numeric values Check for spaces in text field Date selection Email validation Email-birthday validation Email-URL validation Plus-minus buttons Popup help Prevent user from changing value of element Swap items between lists graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
finance Compound interest Loan calculations Sort checks forms Auto-find in list Cancel form submission Check all checkboxes Check for numeric values Check for spaces in text field Date selection Email validation Email-birthday validation Email-URL validation Plus-minus buttons Popup help Prevent user from changing value of element Swap items between lists graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
forms Auto-find in list Cancel form submission Check all checkboxes Check for numeric values Check for spaces in text field Date selection Email validation Email-birthday validation Email-URL validation Plus-minus buttons Popup help Prevent user from changing value of element Swap items between lists graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
graphics Eyeballs Image wiggle on click Make table rows disappear Move an image across the screen Preload images Rainbow text Random image Rollover Screen size Show or hide content Slideshow Slideshow II images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
images Change all images on a page Image of the day-of-the-week Wait until page loads to animate GIF loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
loops Infinite loops math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
math Add commas to a number Calculator - advanced Calculator - simple Random value Round a value menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
menus Menu - always visible Menu - cascading Menu - dropdown select Menu - movable Menu - navigation buttons Menu - slide mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
mouse Change status bar content on mouseover Display link info in statusbar onClick and MouseOver event examples navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
navigation Button as a link - 2 methods Directory header Display all event handlers of an object Forward-Backward buttons Go back one page Highlight links List all links on a page Open file Remove underline from links Slideshow Stop a form from reloading the page when you click on a Submit button Stop browser from jumping to top of page when link is clicked physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
physics Ball drop security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
security Email address protection sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
sound Alternate background sounds Detect browser and play sound Play a sound file syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
syntax External source for script user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
user-system Information Report windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
windows Close a window Create content in a new window Open a new URL in the current window Open a new window (in current window) Open window of specific size Pass data between windows Pass data to a new HTML file Popup window - controlled position View page source write Show time/day visitor comes to a web page Write text to HTML page (write line)
write Show time/day visitor comes to a web page Write text to HTML page (write line)