修正createElement。
===
var common = {};
common.createElement = function (tag, attributes, parent) {
var element = document.createElement(tag);
for (var key in attributes) {
element.setAttribute(key, attributes[key]);
}
if (parent !== undefined) {
parent.appendChild(element);
}
return element;
};
window.common = common;
===.