我有来自服务器的无序列表列表。如何使每个无序列表可选择injavasript
这里有我服务器中的ip地址列表。我需要使每个列表项都可以复制
results.classList.remove('working');
if (opt_error) {
var s = document.createElement('strong');
s.classList.add('warning');
s.innerText = opt_error;
results.appendChild(s);
return console.warn(opt_error);
}
var outer = finder.services;
var inner = finder.ips;
// TODO: render information about outer/inner
// for IPs, render 'last seen at...'
// for services, render known service type.
results.innerHTML = '';
outer.apply(finder).forEach(function(o) {
var li = document.createElement('li');
li.innerHTML = getHtml_(outer, o);
results.appendChild(li);
var ul = document.createElement('ul');
inner.call(finder, o).forEach(function(i) {
var li = document.createElement('li');
li.innerHTML = getHtml_(inner, i);
ul.appendChild(li);
});
ul.childNodes.length && results.appendChild(ul);
});
};