模拟生成GUID码

来源:互联网 发布:qq邮箱端口设置 编辑:程序博客网 时间:2024/05/18 15:23
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<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 类型

 

<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击