then do not use
<input type=reset ...>
use
<input type=button onclick="resetOneRowOnly()">and write your own onclick event handler
<input type=reset ...>
use
<input type=button onclick="resetOneRowOnly()">and write your own onclick event handler
数据的类型又各式各样。能不能用<lable></lable>标签做啊?
<table width=100% ........>
<tr>
<td>.....</td>
<td><input name=time1 type=text id=time1 value=0 size=2 maxlength=3></td>
<td>.....</td>
<td><input name=reset1 type=button value="重置"></td>
</tr>
</table>
<table width=100% ........>
<tr>
<td>.....</td>
<td><input name=time2 type=text id=time2 value=0 size=2 maxlength=3></td>
<td>.....</td>
<td><input name=reset2 type=button value="重置"></td>
</tr>
</table>
........
</form><script language="javascript">
function document.onclick()
{
var e = event.srcElement;
if (e.name!=null && e.name.toLowerCase().indexOf("reset") == 0)
{
var t = e.parentElement;
while (t != null && t.tagName != "TABLE")
t = t.parentElement; if (t != null)
{
var inputs = t.all.tags("INPUT");
for (var i=0; i < inputs.length; i++)
{
if (inputs[i].type == "checkbox" || inputs[i].type == "radio")
inputs[i].checked = inputs[i].defaultChecked;
else if (inputs[i].type == "text")
inputs[i].value = inputs[i].defaultValue;
} inputs = t.all.tags("SELECT");
for (var i=0; i < inputs.length; i++)
{
for (var j=0; j < inputs[i].options.length; j++)
inputs[i].options[j].selected = inputs[i].options[j].defaultSelected;
}
}
}
}
</script>