The user's guide

  1. The description
    Each of the frames of this document is created with the help by last version of the designer "Michael" and demonstrates opportunities of the designer.
  2. Purpose
    This operative help on JAVA is intended for application and study of language of the scripts VBS. The application of language is carried out by an insert of fragments of language and examples in the text of the edited script and illustrative performance of examples. For study of language the elements of language, fragments, examples and comment are given.
  3. The order of application
  4. The tag SCRIPT
    All texts of the scripts should be inside this tags, if you work in a window of editing of "head" or "tags/scripts" (light-blue fields) of object "HTML". Therefore the insert of the scripts-codes in the text SCRIPT is carried out automatically.
    The texts of the scripts of processing of events can be in scripts.
    Examples of the tag:
    <SCRIPT LANGUAGE=JAVASCRIPT>
    <!--
    // The scripts in JAVA here are placed.
     -->
    </SCRIPT>
    <SCRIPT LANGUAGE=JSCRIPT>
    <!--
     //  The scripts in JAVA here are placed.
     -->
    </SCRIPT>
    If to place the scripts inside of the tag HEAD, that script will be loaded before its performance.
  5. PROCEDURES JAVA:
  6. Rules of formation of names of variable
    1. Should begin with the letter or underlining.
    2. Should not contain blanks.
    3. To be unique in the area of application.
    4. There should not be more than 256 symbols.
    5. The register of symbols in a name has meanings.
      Dev1 and DEV1 is different variable.
    6. Should not coincide with names of the code of the designer, for it in this manual all variable begin with symbols DEV.
    7. Before use variable it is not necessary to define.The following key word is applied to definition variable:
      var devx="12345";
  7. Types of the data
    In JAVASCRIPT exists the following types of the data:
    1. string - sequence of symbols in inverted commas;
    2. numbers - integers and decimal fractions;
    3. boolean - True or False;
    4. Null - data are not present;
    5. object - the reference.
  8. Special symbols
    1. \n - new line;
    2. \t - horizontal tabulation;
    3. \f - new page;
    4. \b - backspace;
    5. \r - return of the carriage;
    6. \ - to forbid reaction to the following symbol.
  9. The operators of assignment of value
    operator example mathematics
    = devx=devy devx=devy
    += devx+=devy devx=devx+devy
    -= devx-=devy devx=devx-devy
    *= devx*=devy  devx=devx*devy
    /= devx/=devy devx=devx/devy
    %= devx%=devy devx=devx%devy
    The note: it is possible to use both record of an example, and usual mathematical record.
  10. The operators of comparison
    1. == - equal to;
    2. != - not equal to;
    3. > - greater than;
    4. >= - greater than or equal to;
    5. < - less than;
    6. <= - less than or equal to.
    THE RECOMMENDATION: With an insert of the script - code in object HTML, in tag SCRIPT, do not use the operators of comparison < and >, in exchange use and < = and > =. It will allow an insert to work correctly.
  11. The other operators
    1. + - addition;
    2. - - subtraction;
    3. * - multiplication;
    4. / - division;
    5. % - the remainder after division;
    6. ++ - unary increment;
    7. -- - unary decrement;
    8. & or and - bitwise AND ;
    9. |,or - bitwise OR;
    10. ^ or XOR - bitwise XOR;
    11. << - bitwise Left Shift;
    12. >> - bitwise Right Shift;
    13. >>> - unsigned Right Shift;
    14. && - logical AND ;
    15. || - logical OR;
    16. ! - logical NOT.
  12. THE STRINGS OPERATORS:
  13. Comment
  14. THE MANAGING OPERATORS
  15. The operators of branching
  16. The operators of cycles:
  17. The built~in functions JAVA:
    escape eval isNaN
    parseFload parseInt typeof
  18. THE BUILT~IN OBJECTS:
  19. Object Array
    The object Array represents properties and methods of work with one-dimensional arays.
  20. Object Boolean
    The object Boolean provides work with logic objects.
  21. Object Date
    This object gives an opportunity to work with dates .
  22. Object Function
    The object is intended for creation and compilation of functions in language JAVASCRIPT.
  23. Object Math
    Represents a set of properties and methods for work with mathematical constants and functions. For access to properties and methods it is necessary before them, through a point to specify the reference object as:
    Math.property, method
    EXAMPLE - to show value of PI:
    alert(Math.PI);
  24. Object Number
    Represents a set of properties and methods for work with numbers.
  25. Object String
    Represents property and methods for work with the text.
  26. The forbidden words
    It is impossible to use the following words, which for the name of functions, methods, variable or objects:
    1. abstract
    2. boolean
    3. breack
    4. byte
    5. case
    6. catch
    7. char
    8. class
    9. const
    10. continue
    11. default
    12. delete
    13. do
    14. double
    1. else
    2. extends
    3. false
    4. final
    5. finally
    6. float
    7. for
    8. function
    9. goto
    10. if
    11. implements
    12. import
    13. in
    14. instanceof
    1. int
    2. interface
    3. long
    4. native
    5. new
    6. null
    7. package
    8. private
    9. protected
    10. public
    11. reset
    12. return
    13. short
    14. static
    1. super
    2. switch
    3. synchronized
    4. this
    5. throw
    6. throws
    7. transient
    8. true
    9. try
    10. typeof
    11. var
    12. void
    13. while
    14. with
  27. INPUT~OUTPUT
    Window of the message Window of confirmation
    Window of input
  28. Window of the message
    alert("text");
    Opens a window with the message "text" and button "OK", click which on finishes viewing of the message.
    EXAMPLE - to give out the message:
    alert("Read the text and click OK.");
  29. Window of confirmation
    Confirm("text");
    Opens a window with the message "text" and buttons: "OK", "Cancel". Returns "true", if will click the button "OK" and "false", if "Cancel".
    EXAMPLE - to give out a window of confirmation and to show the returned data:
    alert(confirm("Click for an example OK or Cancel"));
  30. Window of input
    Prompt("text","by default");
    Returns the entered data, if the input is completed by click of the button "OK", or pressing "Enter", or "null", if has clicked the button "Cancel". Shows "text" as the brief instruction on input. Shows " by default " in a field of input.
    EXAMPLE - to give out a window of input and to show the returned data:
    alert("Hi! "+prompt("Enter your name","Mr X."));