當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


VBScript 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 StrReverse Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。