JS 代码如下
function deviceIDs() {
var lis = document.getElementsByClassName('ui-row-ltr');
var content = "";
for (var i=0;i<lis.length;i++){
var temp = lis[i];
var deviceID = temp.getElementsByClassName('ui-ellipsis')[2].innerText;
var name = "name"+i;
content=content+deviceID+" "+name+"\n";
}
return content;
}
网友评论