Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing value not a reference
Message
De
21/03/2016 10:04:43
 
 
À
21/03/2016 05:43:36
Information générale
Forum:
Javascript
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01633405
Message ID:
01633418
Vues:
52
>I doubt so, as JavaScript only support passing parameters by value.
>What probably happens is that lnLeft, not being defined by var lnLeft, is created as a property of the global object (window when executing in a browser); when onMouseOut() executes, it takes whatever lnLeft is in scope, eg window.lnLeft.

Thanks, using var seems to be the simplest way to use.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform