JavaScript里的還是ActionScript 3里的?

解决方案 »

  1.   

    html对象,不是js类衍生的
    创建对象是document.createElement,对象方法都是自带的
    严重鄙视考官~
      

  2.   

    呵呵,你就告诉他 直接:<input type="button" />不就可以了
      

  3.   

    javascript 的   高手来帮帮忙啊~  
      

  4.   

    简单的看看function baseButton(_weight,_height,_color)
    {
        this.btn = document.createElement("input");
        this.btn.type = "button";
        this.btn.style.width  = _weight;
        this.btn.style.height = _height;
       // debugger;
        this.btn.style.backgroundColor = _color;
    }var btn = new baseButton(10,10,"red");
    var btn2= new baseButton(100,100,"green");
    document.body.appendChild(btn.btn);
    document.body.appendChild(btn2.btn);