js中with的用法

js中with的用法

with语句用于设置代码在特定对象中的作用域。它的语法:with(expression)statement例如:varsMessage="hello"with(sMessage){alert(toUpperCase())
JavaScript150