@set : set : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » set »

 

@set











Syntax








@set @varName = value



The @set property creates custom compiled variables.

The name of a custom variable must start with an ampersand character.

If the variable is used before being defined, its value will be NaN.












<html>
    <script language="JScript">
    <!--
    //Create a custom compiled variable called @number and set it to 25
    @set @number = 25;

    @if(@number == 25)
      document.write("Number is equal to ",@number);
    @else
      document.write("Number is not equal to 25.");
    @end
    -->
    </script>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» set