alert(parseInt(10*Math.random()));
alert(Math.floor(Math.random()*10+1));
JS中判断null、undefined与NaN的方法 JS判断字符串是否符合日期格式