JavaScript Tutorial/Statement/With

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

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>