如何在vbscript中创造机会? [英] how to create chances in vbscript?

查看:76
本文介绍了如何在vbscript中创造机会?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有任何机会可以一定的机会执行某项操作.例如:
我希望执行动作1时有5分的机会1.
如果有人可以帮忙,谢谢!!!!!!!!!!!

i was wondering if there was any way to perform a action with a certain amount of chances. for a example:
i want action 1 performed with a chance 1 out of 5.
if any one can help, thank you!!!!!!!!!!!

推荐答案

使用Rnd函数:http://w3schools.com/vbscript/func_rnd.asp [ ^ ]
第三个示例确实符合您的要求.
Use the Rnd function: http://w3schools.com/vbscript/func_rnd.asp[^]
The third example does close to what you want.


这篇关于如何在vbscript中创造机会?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆