var obj ={a:1};
with(obj){
a = 2;
b = 3;
}
console.log(obj.a);//2
console.log(obj.b);//undefined
console.log(window.b);//3
[url=http://yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/]with-statement-considered-harmful[/url]
var obj ={a:1};
with(obj){
a = 2;
b = 3;
}
console.log(obj.a);//2
console.log(obj.b);//undefined
console.log(window.b);//3