<form id="form1" name="form1" method="post" action="">
<input id="name1" name="name1" type="text" value="ss" />
<input id="name2" name="name2" type="text" value="ss" />
</form>
<script>
document.form1.name1.value='dddd';
document.getElementById("name2").value='jj';
</script>
|