with语句将代码的作用域设置到一个特定的对象中
严格模式下不允许使用with语句。大量使用with语句会导致性能下降。
with(location) { var a1 = search var a2 = host console.log(a1,a2) } console.log(a1,a2)