Question: i have html form 

```
<form name="updatefrm" id="updatefrm" action="" method="post">
<input type="hidden" name="98" id="98" value="" />

<input type="hidden" name="99" id="99" value="" />
<input type="hidden" name="100" id="100" value="" />
<input type="hidden" name="101" id="101" value="" />
<input type="hidden" name="102" id="102" value="" />
<input type="hidden" name="updateqty" id="updateqty" value="1" />
</form>

```

now i want to assign value to this elements 
i m using following javascript code for element with id 98 

```
document.updatefrm."98".value = elements[0].value;

```

but its giving me error in console.

can any one help me with this ?

Answer: 
[Why can't I have a numeric value as the ID of an element?](https://stackoverflow.com/questions/7987636/why-cant-i-have-a-numeric-value-as-the-id-of-an-element)

```
// Change your numeric id.

var myValue=document.getElementById('your_changed_id').value;
alert(myValue)

```

Go for simplicity..Instead of writing this complex code.why not try a simple code which does the same thing
`document.getElementById('your_changed_id').value`
You should not give numbers as `ID` include any kind of character..

Try like this:

```
document.forms["updatefrm"]["s98"].value = elements[0].value;

```

[**Fiddle**](http://fiddle.jshell.net/54M8W/)