×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: Javascript
Posted by: petecocoon
Added: Mar 28, 2011 11:53 AM
Views: 168
Tags: guid generator
taken from http://goo.gl/z2RxK
  1. function guid() {
  2.   var S4 = function() {
  3.     return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
  4.   };
  5.   return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
  6. },
  7.