JS产生四位随机数的方法
<script>
var charactors="1234567890";
var value='',i;
for(j=1;j<=4;j++){
i = parseInt(10*Math.random());
value = value + charactors.charAt(i);
}
document.write(value);
</script>
<script>value =Math.floor(Math.random()*4000+1000);document.write(value);</script>