js代码:
var btn = document.getElementById("btn");
function Div(width,height,left,top,bgcolor){
this.width = width;
this.height = height;
this.left = left;
this.top = top;
this.bgcolor = bgcolor;
}
Div.prototype.createDiv = function(){
//使用this。div相当于在实例化对象中又创建了一个div属性,并将document.createElement("div")赋值给这个div
this.div = document.createElement(