var dish = ['鱼香肉丝','北京烤鸭','麻婆豆腐','酸辣土豆丝','回锅肉','煎饼卷大葱'];var num = Math.floor(Math.random()*(y+1-x)+x);
此处案例就是
var num = Math.floor(Math.random()*(5+1-0)+0);