Search this site...

Scripts

Download scripting code examples

For your convenience, Scripting Master provides some common examples of tasks that you may perform with different scripting languages. Each scripting example is written to minimize any editing on your part. So all you have to do to use the code is call a function or functions with correct parameters shown in the examples. The output of each coding example is also shown so you know for sure what the code does. Also, each major step in the code is heavily commented to help you understand.

Scripts for JavaScript

  • Browser functions
    • Display browser information — this example shows how to gather information about a user's browser.
    • Browser based redirect — this script redirects a browser to a specific desired page based on the browser's version number.
    • Detect platform — is it Windows, Macintosh or some other platform used to access the web page? Find out with this script.
  • Date and time functions
    • Hour based greeting — this is a simple script that prints a greeting message based on the hour of the day.
    • Get current month name — this scripting function returns the current name of the month (e.g., January, February, or March etc.).
    • Get current day — this script shows how to get the current name of the day (e.g., Sunday, Monday, or Tuesday etc.) of the week.
    • Time-related functions — this script includes number of functions that shows how to get specific time-related values: year, month, day of the month, day of the week, hour of the day, minutes, and seconds.
    • Digital clock — shows a simple script that can display a digital clock.
    • Seconds passed since last refresh — this code shows how to use a counter variable to determine when a web page was last refreshed. The code uses the JavaScript setTimeout () method to update the counter variable every second.

ASP Scripts