function Drawitems() {
var $list = $("#shoppinglistitems").empty();
//go through the list array to get elements ---->we will do that by using for loop
for (var i = 0; i < currentlist.items.length; i++) {
var currentitem = currentlist.items[i];
//create dom element for this list item
var $li = $("<li>").html.currentitem.name.attr("id", "item_" + i)
var $DeleteBt = $("<button>D</button>").appendTO($li);
var $CheckBt = $("<button>C</button>").appendTO($li);
$li.appendTO($list);
}
当我尝试在google chrome上显示应用程序时,出现以下错误:
未捕获名称:无法读取未定义的属性‘TypeError’,因此我该怎么办
诚挚的问候
发布于 2018-05-31 18:28:43
试一试
var $li = $("<li>").html(currentitem.name).attr("id", "item_" + i)
https://stackoverflow.com/questions/50621002
复制相似问题