Pass by reference to COM object in JavaScript -


trying pass i variable test function must change value:

<html> <head> <title> welcome site</title></head> <body> <script language="javascript">  var atl = new activexobject("atl.object.1"); var =6; atl.test(i); document.write(i);  </script> </body> 

but in output still have 6. how pass value reference?

on javascript pass reference not exist. can use object pass , works passing reference.

eg :

    var atl = new activexobject("atl.object.1");     var = { value: 6}; //if activexobject not work object, need make adapter or store value     atl.test(i);     document.write(i.value); 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -