function newGuid(){
var guid = "";
for (var i=1; i<=32; i++){
var n = Math.floor(Math.random()*16.0).toString(16);
guid += n;
if((i==8)||(i==12)||(i==16)||(i==20))
guid += "-";
}
return guid;
}
function newGuid(){
var guid = "";
for (var i=1; i<=32; i++){
var n = Math.floor(Math.random()*16.0).toString(16);
guid += n;
if((i==8)||(i==12)||(i==16)||(i==20))
guid += "-";
}
return guid;
}
本文标题:JS生成Guid字符串
本文链接:https://www.haomeiwen.com/subject/xzpdnrtx.html
网友评论