H5_0011:JS动态创建html并设置CSS属性
1,创建html文本,并设置指定css样式
r = function(e) {
var t = document.createElement("div");
t.innerHTML =
'<table style="background-color: #8CE; width: 100%; height: 100%;"><tr><td align="center"><div style="display: table-cell; vertical-align: middle;"><div style="">' +
e + "</div></div></td></tr></table>",
document.body.appendChild(t)
};
(n = document.createElement("canvas")).setAttribute("id", "application-canvas"),
琥珀君的博客