You have to return the result of getElementByID:
var anobject = {
getId: function(id){
return document.getElementById(id);
}
}
2
solved Getting an id function inside an object
You have to return the result of getElementByID:
var anobject = {
getId: function(id){
return document.getElementById(id);
}
}
2
solved Getting an id function inside an object