console 命令行工具
X
clear
> Uncaught SyntaxError: Unexpected token '...'
console
var Factory = function(type, content) {
if(this instanceof Factory) {
return new this[type](content);
} else {
return new Factory(type, content);
}
}
Factory.prototype = {
Java: function(content) {
this.content = content;
(function(content){
var div = document.createElement("div");
div.innerHTML = content;
div.style.color = "green";
document.getElementById("container").appendchild(div);
})(content);
},
php: function(content) {
...
}
}