...

View Full Version : How to modify hidden value



EdwardKing
01-21-2006, 03:36 AM
I have a HTML file,there are hidden parameter in in this HTML,hidden parameter name is made of "test"+number,such as
<form name="test" id="test">
<input type="hidden" name="test0" value="9">
<input type="hidden" name="test1" value="5">
<input type="hidden" name="test2" value="6">
<input type="hidden" name="test3" value="1">
</form>

I want to dynamic modify the hidden value,for example
i=3 //the value of i is get dynamic,i=2 or i=3 or any number
test.test<i>.value="99"
I know above sentence is error,how to write it correctly?

Thanks!

gph
01-21-2006, 05:02 AM
document.test['test'+i].value=99;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum