dimanche 21 août 2016

JAva scrip not working

function submit(){
    var text;
    do{text="Não Completou o formelario";}
    while(x=="" && y=="");
    document.getElementById("Erros").innerHTML=text;

    var x=document.getElementById("PNome");
    var y=document.getElementById("UNome");
    var Person=function Person(first,last)
    {
        this.firstName=first;
        this.lastName=last;
    };
    Person.prototype.name=function(){
        return this.firstName+" "+this.lastName;
    };
    var Pessoa=new Person(x,y);
document.getElementById("demo").innerHTML=Pessoa.name();
}

this code is not horking the ptrototype is returnig [object HTMLInputElement] [object HTMLInputElement] help fast please.

Aucun commentaire:

Enregistrer un commentaire