script type='text/html' id='demo' 动态设置内容用layer弹出后渲染不了

// html代码



// js代码
var table = ""
$checked.each(function () {
   var foo= $(this).val();
   table+= "";
   table+= "";
   table+= "";
   table+= "";
   table+= "";
   table+= "";
                   
  }
});
table += "
" + foo.stuNumber + "" + foo.name + "" + foo.className + "" + foo.dormNum + "
" $("#demo").append(table); layer.open({ title: "提交确认", type: 1, area: ['800px', '500px'], content: $("#demo").html() });

最后发现layer弹出后,动态往#demo中添加的内容渲染不了,思考其原因应该是:

你可能感兴趣的:(web)