REGISTER











Instrucțiunea iterativă With
#1
Instrucțiunea iterativă With
Declarația with stabilește obiectul implicit pentru setul de declarații care urmează.
Code:
with ( document ) {
   var a = getElementById ( 'a' ) ;
   var b = getElementById ( 'b' ) ;
   var c = getElementById ( 'c' ) ;
                              };
Observăm absența documentului înainte de fiecare invocare getElementById(). Semantica este similară celei din Pascal .
Reply



Powered by MyBB All rights reserved
Developed with for FASTCS 2011 - 2024 FASTCS