CODE:
<body>
<script>
function a(){
with(this){ // ??
a=1;
}
this.b=2
this.getB=function(){
return this.b
}
}
a1=new a()
document.body.innerHTML+=a1.a+"<BR>"
document.body.innerHTML+=a1.getB()+"<BR>"
a1.a=11
document.body.innerHTML+=a1.a+"<BR>"
document.body.innerHTML+=a1.getB()+"<BR>"
</script>
|