Sólo apuntar que los setters y getters sí existen (vía los métodos mágicos __defineGetter__ y __defineSetter__ o los operadores set y get), pero el querido explorer no los soporta, así que ajo y agua.
De todas maneras dejo un ejemplo y un par de enlaces:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<script>
function circle(radio, positionX, positionY)
{
this.ra = radio;
this.di = radio*2;
this.element = document.body.appendChild(document.createElement("div"));
this.element.style.position = "absolute";
this.element.style.left = positionX+"px";
this.element.style.top = positionY+"px";
this.element.style.width = radio*2+"px";
this.element.style.height = radio*2+"px";
this.element.style.backgroundColor = "#000";
}
try{
circle.prototype={set posX (x){this.element.style.left=x+'px';}}//operador
circle.prototype.__defineSetter__('posY',function(x){this.element.style.top=x+'px';});//método mágico
}catch(e){
alert('soy explorer');
}
onload=function(){
var c=new circle(50, 10, 10);
c.posX=500;
c.posY=200;
}
</script>
</head>
<body>
</body>
</html>
http://www.robertnyman.com/javascrip...rs-and-setters https://developer.mozilla.org/en/Cor...rs_and_Setters