新增createElement,在建立元件的同時設置他的屬性。
===
var common = {};
common["createElement"] = function (tag, attributes) {
var element = document.createElement(tag);
for (var attribute of attributes) {
element.setAttribute(attribute, attributes[attribute]);
}
return element;
};
===.