asp,asp.net,php生成guid的办法
asp
-VBScript
Function getGUID()
Dim TypeLib
Set TypeLib = Server.CreateObject("Scriptlet.TypeLib")
getGUID = replace(replace(TypeLib.Guid,"{",""),"}","")
Set TypeLib = Nothing
End Function
Dim TypeLib
Set TypeLib = Server.CreateObject("Scriptlet.TypeLib")
getGUID = replace(replace(TypeLib.Guid,"{",""),"}","")
Set TypeLib = Nothing
End Function
asp.net
-C#
string GUID=System.Guid.NewGuid().ToString();
js,使用acx,仅ie有效果
-JavaScript
function GUID(){
var TypeLib = new ActiveXObject("Scriptlet.TypeLib");
return TypeLib.Guid;
}
alert(GUID())
var TypeLib = new ActiveXObject("Scriptlet.TypeLib");
return TypeLib.Guid;
}
alert(GUID())
php查看下面这篇文章
php学习--生成guid
加支付宝好友偷能量挖...
原创文章,转载请注明出处:asp,asp.net,php生成guid的办法