value Property (Scripting Object Model)

            Applies To

Specifies a string for the VALUE attribute.

Syntax

object.value

Parameters

object

A script object.

Remarks

The value property sets the VALUE attribute that is used by the HTML intrinsic that is created by the script object.

For the Button object, this property specifies the text string that appears on the button.

Example

The following client-side script is called whenever Button1 is clicked by the user. The value of Textbox1 is evaluated and if it has not been set by the user, it is assigned a value of "default".

<SCRIPT LANGUAGE=JAVASCRIPT>
function Button1_onclick() {
if (Textbox1.value == "")
   {
   Textbox1.value = "default"
   }
}
</SCRIPT>