ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






OPERATOR:   +

 +

The + operator has two uses. It is used to add numbers together. It also may be used to concatenate (combine) strings together.

Note it is usually recommended that only the & operator be used for string concatenation.

Addition:

Code:
<% total = 5.678 + 0.234 + 23.1 %>

Output:
29.012

Concatenation:

Code:
<% cheese=" is made of blue cheese." %>
<% sentence="The moon" + cheese + " Mice like blue cheese." %>

Output:
The moon is made of blue cheese. Mice like blue cheese.