(1)使用Math 函数
比如生成一个固定 12位的随机数:num = Math.floor(Math.random()*(199999999999-100000000000+1)+100000000000);
( 2 ) 利用时间戳
var timestamp = Date.parse(new Date()); // timestamp 在java中的固定长度为 13位
(1)使用Math 函数
比如生成一个固定 12位的随机数:num = Math.floor(Math.random()*(199999999999-100000000000+1)+100000000000);
( 2 ) 利用时间戳
var timestamp = Date.parse(new Date()); // timestamp 在java中的固定长度为 13位