找回密码
 立即注册

QQ登录

只需一步,快速开始

为爱走天涯

中级会员

70

主题

142

帖子

594

积分

中级会员

积分
594

时代开发者征文活动

为爱走天涯
中级会员   /  发表于:2023-12-29 21:00  /   查看:1051  /  回复:4
活字格如何读取硬盘序列号呢?

4 个回复

倒序浏览
true
中级会员   /  发表于:2024-1-2 13:17:42
沙发
那肯定是读取不了,得写插件
回复 使用道具 举报
lml0126
高级会员   /  发表于:2024-1-3 19:14:22
板凳
可以使用JS自己获取,但用活字格又要这么底层的信息是做什么呢
 var locator = new ActiveXObject ("WbemScripting.SWbemLocator");
   var service = locator.ConnectServer(".");
   var properties = service.ExecQuery("SELECT * FROM Win32_DiskDrive");
   var e = new Enumerator (properties);
   document.write("<table border=1>");
   for (;!e.atEnd();e.moveNext ())
   {
      var p = e.item ();
      document.write("<tr>");
      document.write("<td>" + p.signature + "</td>");
      document.write("</tr>");
   }
   document.write("</table>");
回复 使用道具 举报
true
中级会员   /  发表于:2024-1-4 10:00:20
地板
lml0126 发表于 2024-1-3 19:14
可以使用JS自己获取,但用活字格又要这么底层的信息是做什么呢
 var locator = new ActiveXObject ("WbemS ...

浏览器的安全性限制和ActiveX在现代浏览器中的不再支持,这段代码可能只在过时的Internet Explorer浏览器中运行
回复 使用道具 举报
ikens
初级会员   /  发表于:2024-1-15 12:14:18
5#
论坛  搜索kk浏览器
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部