why i cannot replace value of a hidden input?
<p>i have a hidden input like this:</p>

<pre><code>&lt;input type="hidden" id="selectedItem" value="1,1,1," name="selectedItem"/&gt;
</code></pre>

<p>and i want to replace some values of it to:</p>

<pre><code>value="9,9,9"
</code></pre>

<p>i tried to used </p>

<pre><code>document.getElementById('selectedItem').value = document.getElementById('selectedItem').value.replace(/1/gi,'9')
</code></pre>

<p>or</p>

<pre><code>document.getElementById('selectedItem').value = document.getElementById('selectedItem').value.replace('1','9')
</code></pre>

<p>but it didnot work. Please someone tells me why and give me some solutions. 
Thank You</p>
