javascript中的with

来源:互联网 发布:网络授权委托书 编辑:程序博客网 时间:2024/06/06 20:07

with(document)  
  {  
      write   ("test");  
      write   ("dsasfda");  
  }  
  上面是用了with  
  如果不用的话就要这样写了  
  document.write   ("test")  
  document.write   ("dsasfda");  
   
  省掉了不少的代码哟

原创粉丝点击