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

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -