For certain reason, I need to check the validity of a form when submit with many data with shared name. The form looks like this:
[HTML]<form id="upload_form " name="upload_fo rm" onsubmit="retur n uploadCheckVali d2()">
<table>
<tr>
<td>xxx</td>
</tr>
<tr>
<td>
<input type="text" name="title[]" value="10" />
</label></td>
....
....
</form>[/HTML]
For the js:
[CODE=javascript]function uploadCheckVali d2()
{
var titles = document.forms[0].elements['title'][0].value;
alert(titles);
if(xxx != xxx)
return false;
}[/CODE]
I don't even able to alert the nodeName or value. Could anyone help??
[HTML]<form id="upload_form " name="upload_fo rm" onsubmit="retur n uploadCheckVali d2()">
<table>
<tr>
<td>xxx</td>
</tr>
<tr>
<td>
<input type="text" name="title[]" value="10" />
</label></td>
....
....
</form>[/HTML]
For the js:
[CODE=javascript]function uploadCheckVali d2()
{
var titles = document.forms[0].elements['title'][0].value;
alert(titles);
if(xxx != xxx)
return false;
}[/CODE]
I don't even able to alert the nodeName or value. Could anyone help??
Comment