一句代码让js实现PHP的rand方法

function rand(a, b){
	return parseInt((Math.random().toString()).substr(2)) % (b-a+1) + a ;
},

添加新评论