if (result.success) { var obj = JSON.parse(result.data); var sltObj = document.getElementById("selUser"); //获取select对象 for (var i = 0; i < obj.length; i++) { var optionObj = document.createElement("option"); //创建option对象 optionObj.v…
代码 # -*- coding: utf-8 -*- import psutil #获取网卡名称和其ip地址,不包括回环 def get_netcard(): netcard_info = [] info = psutil.net_if_addrs() for k,v in info.items(): for item in v: if item[0] == 2 and not item[1]=='127.0.0.1': netcard_info.append((k,item[1])) retu…