Apr 30, 2012

Generate unique ID with javascript

Generate unique ID with javascript:<br/>
function guidGenerator() {
 var S4 = function() {
  return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
 };
 return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}