如何选择(突出显示)可选择的项目而不单击它(通过代码)?
这样我就给它选择/突出显示哪个框的索引
我像那样动态地创建它们
<div class="demo"> <ol id="selectable"> </ol></div>
和
var div = document.getElementById("selectable");
for(i=0; i<list.size; i++)
{
// It should look like that
//<li class="ui-widget-content">Item 1</li>
var properties = list[i].getProperties();
var aTag = document.createElement("li");
//file name or something as ID
aTag.setAttribute('class',"ui-widget-content");
aTag.setAttribute('id',i);
aTag.innerHTML = properties.fileName;
//file name
div.appendChild(aTag);
}