JavaScript Tutorial/Statement/With — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
 
м (1 версия)
 
(нет различий)

Текущая версия на 11:25, 26 мая 2010

with

Syntax



   <source lang="javascript">

with(object){

     code;
   }</source>
   
  

with statement

The with statement works by placing the repetitive portion of the object"s path in parentheses.

The with Statement Reduces Repetitive Code.



   <source lang="javascript">

<html> <head> <title>A Simple Page</title> <script language="JavaScript">

</script> </head> <body> </body> </html></source>