主题:这个点击怎么没反应
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<br>
<script language="javascript">
function abc()
{if(form1.textfield.value=="")
{window.alert("用户名不能为空");
form1.textfield.focus();
}
}
</script >
</head>
<body>
<form name="form1" method="post" action="">
<table width="230" border="1" align="center" >
<tr>
<td width="46">用户名</td>
<td width="168"><input type="text" name="textfield"></td>
</tr>
<tr>
<td>密 码</td>
<td><input type="text" name="textfield"></td>
</tr>
<tr>
<td colspan="2"><input type="button" name="Submit1" value="提交" onClick="abc()">
<input type="reset" name="Submit2" value="清空"></td>
</tr>
</table>
</form>
</body>
</html>
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<br>
<script language="javascript">
function abc()
{if(form1.textfield.value=="")
{window.alert("用户名不能为空");
form1.textfield.focus();
}
}
</script >
</head>
<body>
<form name="form1" method="post" action="">
<table width="230" border="1" align="center" >
<tr>
<td width="46">用户名</td>
<td width="168"><input type="text" name="textfield"></td>
</tr>
<tr>
<td>密 码</td>
<td><input type="text" name="textfield"></td>
</tr>
<tr>
<td colspan="2"><input type="button" name="Submit1" value="提交" onClick="abc()">
<input type="reset" name="Submit2" value="清空"></td>
</tr>
</table>
</form>
</body>
</html>

您所在位置:
