Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

VBScript Examples

VBScript Examples

Basics

Writing text with VBScript

Formatting text with HTML tags

Functions in the head section

Scripts in the body section

Variables

Creating a variable

Inserting a variable's value into a piece of text

Creating an Array

Program

Subroutines

Function procedures

Conditional statement

If...then..else statement

If...then..elseif statement

Select case statement

Random links

Loop

For..next loop

Looping to output HTML headings

For..each loop

Do...While loop

Date and time functions

Display Date and Time

Displaying the weekday

Displaying the month

Displaying the current month and weekday

Counting down the seconds to the year 3000

Adding a time interval to a date

Formatting dates and times

Is This a Date?

Other built-in functions

Uppercase or lowercase characters?

Removing spaces from the ends of a string

Reversing the order of characters

Rounding a number to an integer

Returning a random number

Returning a random number between 0 and 99

Returning a specified number of characters from the left or right side of a string

Replacing certain characters in a string

Returning a specified number of characters from a string