//获取时间戳+四位随机数:
function getTransactionID() {
return "" + getCurrentTime() + getRandom();
}
function getCurrentTime() {
return new Date().valueOf();
}
function getRandom() {
return Math.floor(Math.random() * 10) * 1000 + Math.floor(Math.random() * 10) * 100 + Math.floor(Math.random() * 10) * 10 + Math.floor(Math.random() * 10);
}