JavaScript中类似PHP的uniqid()方法
- JavaScript中类似PHP的uniqid()方法:
function generateUIDNotMoreThan1million() {
return ("0000" + (Math.random()*Math.pow(36,4) << 0).toString(36)).slice(-4)
}
function generateUIDNotMoreThan1million() {
return ("0000" + (Math.random()*Math.pow(36,4) << 0).toString(36)).slice(-4)
}