//获取0-4整数 var randomLoc = Math.floor(Math.random() * 5);
获取0-4整数
原文:https://www.cnblogs.com/themost/p/9291789.html