名字写错了
<form name = form1>
<input type=text name = t >
<input type=text name = t >
<input type=text name = t >
<input type=button value=check onclick="checkText()">
</form>
<script>
function checkText()
{
for (i = 0 ;i<form1.t.length;i++)
{
if (form1.t[i].value=="")
{
alert("not");
form1.t[i].focus();
return false;
}
}
<form name = form1>
<input type=text name = t >
<input type=text name = t >
<input type=text name = t >
<input type=button value=check onclick="checkText()">
</form>
<script>
function checkText()
{
for (i = 0 ;i<form1.t1.length;i++)
{
if (form1.t1[i].value=="")
{
alert("not");
return false;
}
}