javascript global array
<p>I am having below html code and trying to add new values to global array by onchanging of javascript function.I am trying to do  like below way.But it is giving javascript errors.Please suggest anyone how to do this.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script&gt;
var list=[];
function getList(value){

list=list(value);
}
&lt;/script&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;tr&gt;
&lt;td&gt;
&lt;select name="test" onchange="getList(this)"&gt;
&lt;option id="1" value="one"&gt;One&lt;/option&gt;
&lt;option id="2" value="two"&gt;two&lt;/option&gt;

&lt;/select&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;select name="test1" onchange="getList(this)"&gt;
&lt;option id="3" value="three"&gt;three&lt;/option&gt;
&lt;option id="4" value="four"&gt;four&lt;/option&gt;

&lt;/select&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
