{
//n到m随机数 [n,m]
var w=m-n
Math.round(Math.random()*w+n)
}
-------------------------------------------------------------------------
{
// (n,m)
var w=m-n
Math.round(Math.random()*w+n+1)
}
------------------------------------------------------------------------
{
// (n,m]
var w=m-n
Math.floor(Math.random()*w+n) + 1
}
-----------------------------------------------------------------------------
{
// [n,m)
var w=m-n
parseInt(Math.random()*w+n, 10)
}
-----------------------------------------------