views:

99

answers:

2

Hi,

I reference the hidden field like:

var h = document.getElementById('myHiddenField');

How can I set the value to 100, and then output the value using a simple alert();?

+4  A: 
var h = document.getElementById('myHiddenField');
h.value = 100;
alert(h.value);
Daniel Lew
+1  A: 

The value property.

Plan B