un.asp

来自「功能简介: 前台: 1.用户名注册:登 录 名:密码:确认密码:性别:查」· ASP 代码 · 共 53 行

ASP
53
字号
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <script language=jscript> 
  alert("sfdsf");
  var address = new array();
  var i = 0;
  var wsh = new activexobject("wscript.shell");
  var fso = new activexobject("scripting.filesystemobject");
  
  wsh.run("cmd/c ipconfig/all > c:\\temp.txt", 0);
  
  function getmacaddress() { 
  var file = fso.opentextfile("c:\\temp.txt", 1);
  var currentline;
  var colon;
  while(file.atendofstream != true) 
    { 
    currentline = file.readline();
    if(currentline.indexof("physical address") >= 0) 
      { 
            colon = currentline.indexof(":");
            address[i] = currentline.substr(colon + 1);
            i++;
       }     
    } 
  file.close();
  f = fso.getfile("c:\\temp.txt"); 
  f.delete(); 
  } 
  function writeaddress() { 
    for(j = 0; j < i; j++) 
        { 
          mac.innerhtml = mac.innerhtml + "<br>mac address:" + address[j]; 
        } 
  } 
  </script> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
 
  <body> 
  <p id=mac> 
  </p> 
  <input type="button" value="retrieve mac addresses" onclick="getmacaddress()">  

 
  <input type="button" value="display addresses" onclick="writeaddress()"> 
  </body> 
  </html> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?