futrueface

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Dim i,mm,Str,StrPosition,NewStr
Str = "1234567890"
For i=1ToLen(Str)
    StrPosition = GetRandomMath(1,Len(Replace(Str,mm,"")))
    Str = Replace(Str,mm,"")
    mm = Mid(str,StrPosition,1)
    NewStr = NewStr & mm
Next
WScript.Echo "NewStr = " & NewStr

Function GetRandomMath(begin,over)
    Randomize
    GetRandomMath = Int((Rnd * (over - begin + 1)) + begin)
EndFunction

posted on 2014-11-26 14:35  futrueface  阅读(531)  评论(0编辑  收藏  举报