var list = {
bindEvent:function(){
//用于生成uuid,获取广告所用第一步
S4:function(){
return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
},
//用于生成uuid,获取广告所用第二步
getRandomId:function(){
var self = this;
return (self.S4()+self.S4()+"-"+self.S4()+"-"+self.S4()+"-"+self.S4()+"- "+self.S4()+self.S4()+self.S4());
}
},
//调用
getAdvert:function(){
var self = this;
console.log('cms'+self.getRandomId())
}
}
jquery模拟生成uuid
最新推荐文章于 2024-05-01 21:45:00 发布