随机书的处理

  var oDivNum = Math.floor(Math.random() * (size + 1) + 1) - 1;

 随机数从1~3 之间

document.write(Math.floor(Math.random()*3+1))
原文地址:https://www.cnblogs.com/yjhua/p/4624000.html