參考Ext3.0 source code<br><br>function getRandomInt(min, max){<br> return Math.floor(Math.random() * (max - min + 1)) + min;<br>}