skip to main
|
skip to sidebar
tricks for programming
Monday, June 18, 2012
To generate UUID in javascript
function S4() {
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
}
function generateGUID() {
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
►
2013
(1)
►
January
(1)
▼
2012
(5)
►
September
(1)
►
July
(1)
▼
June
(1)
To generate UUID in javascript
►
May
(1)
►
March
(1)
►
2011
(7)
►
October
(1)
►
April
(2)
►
March
(1)
►
February
(1)
►
January
(2)
►
2010
(10)
►
October
(1)
►
June
(1)
►
April
(1)
►
March
(4)
►
February
(3)
Contributors
beku
chinzo
No comments:
Post a Comment