北大青鸟.net学习之一
最基础的表单提交代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>北大青鸟学习代码</title>
<script language="javascript">
function abc()
{
if(form1.textfield.value=="")
window.alert("用户名不能为空!");
form1.textfield.focus();
}
</script>
</head>
<body>
<form action="" method="post" name="form1" id="form1">
<table width="255" border="1" align="center">
<tr>
<td width="66"> 用户名</td>
<td width="173"><input type="text" name="textfield" /></td>
</tr>
<tr>
<td> 密 码</td>
<td><input type="text" name="textfield2" /></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="button" name="Submit" value="确定" onclick="abc()" />
<input type="reset" name="Submit2" value="重设" />
</div></td>
</tr>
</table>
</form>
</body>
</html>
主要基本学习基本语法,进入基本的学习环节。
浙公网安备 33010602011771号