VBScript StrReverse 函数



StrReverse

StrReverse 函数会反转指定的字符串。

语法

StrReverse(string) 

示例

<!DOCTYPE html>
<html>
   <body>
      <script language = "vbscript" type = "text/vbscript">
         document.write("Line 1 : " & StrReverse("VBSCRIPT") & "<br />")
         document.write("Line 2 : " & StrReverse("My First VBScript") & "<br />")
         document.write("Line 3 : " & StrReverse("123.45") & "<br />")

      </script>
   </body>
</html>

将其保存为 .html 文件,并在 Internet Explorer 中执行,则上述代码将会生成如下的结果 -

Line 1 : TPIRCSBV
Line 2 : tpircSBV tsriF yM
Line 3 : 54.321
vbscript_strings.htm
广告
© . All rights reserved.