var div = document.getElementById("tab");
var table = document.createElement("table"); //创建table
table.setAttribute("id", tableId);
table.setAttribute("title", producttitle);
table.setAttribute("style", "width:99%;height: 200px;margin: 0 auto");
table.setAttribute("data-options", "singleSelect:true,collapsible:true,striped:true");
div.appendChild(table);//div添加table