<html>
<head>
<title>模拟生成GUID码</title>
</head>
<body>
<pre>
<script language="JavaScript" type="text/javascript">
<!--
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 += "-";
}
guid += "}";
document.write(guid);
// -->
</script>
<br>
<a href="http://www.alixixi.com">欢迎访问阿里西西_WEB开发技术网站</a>
</pre>
</body>
</html>
<head>
<title>模拟生成GUID码</title>
</head>
<body>
<pre>
<script language="JavaScript" type="text/javascript">
<!--
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 += "-";
}
guid += "}";
document.write(guid);
// -->
</script>
<br>
<a href="http://www.alixixi.com">欢迎访问阿里西西_WEB开发技术网站</a>
</pre>
</body>
</html>
ASP生成GUID全球唯一识别码方法:
Dim objTypeLib
Set objTypeLib = CreateObject("Scriptlet.TypeLib")
szUID = Mid(objTypeLib.Guid,2,36)
Set objTypeLib = Nothing
ASP.NET生成GUID全球唯一识别码方法:
System.Guid.NewGuid()
MSSQL生成GUID字段:
uniqueidentifier 类型