there's not a good one that I can think of. You could do something like this:
Code:
<script type="text/javascript">
var test1="name|value"
var test3=document.forms.form1[test1.split("|")[0]][test1.split("|")[1]];
alert(test3)
</script>
but it's probably more trouble than it's worth.
Being that all form elements have a value (or can be given one), you might find that this is more useful:
Code:
<script type="text/javascript">
var test1="name"
var test3=document.forms.form1[test1].value;
alert(test3)
</script>
if not, maybe you could describe a little more what you are trying to do - there may be a simpler solution...
Bookmarks