login.php源代码分析

<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>

<html>

<head>

<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<link href="../css/style.css" rel="stylesheet">

</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<script language="javascript">

function chkinput(form){

if(form.name.value==""){

alert("请输入用户名!");

form.name.select();

%如果用户名为空,则将焦点定位在用户名输入框。

return(false);

%返回假

}

if(form.pwd.value==""){

alert("请输入用户密码!");

form.pwd.select();

%如果密码为空,则将焦点定位在密码输入框

return(false);

%返回假

}

return(true);

%只有用户名和密码都不为空的情况下,才返回真

}

</script>

<form name="form1" method="post" action="chkadmin.php" onSubmit="return chkinput(this)">

%如果用户点击提交按钮,那么页面将调用chkinput的JavaScript脚本来验证用户名和密码是否为空

%并将业务提交给chkadmin.php来处理

<table width="547" border="0" align="center" cellpadding="0" cellspacing="0" id="__01">

<tr>

<td height="94" background="images/default_01.gif">&nbsp;</td>

</tr>

<tr>

<td height="160" align="center" background="images/default_02.gif"><table width="83%" height="93" border="0" cellpadding="0" cellspacing="0">

<tr>

<td width="39%" height="30" align="right">管理员名称:&nbsp;</td>

<td width="61%">&nbsp; <input name="name" type="text" id="name"></td>

</tr>

<tr>

<td height="30" align="right">管理员密码:&nbsp;</td>

<td>&nbsp; <input name="pwd" type="text" id="pwd"></td>

</tr>

<tr align="center">

<td height="60" colspan="2"><input name="imageField" type="image" src="images/btn1.gif" width="79" height="37" class="input1">

&nbsp;&nbsp;&nbsp;

<input name="imageField2" type="image" src="images/btn2.gif" width="79" height="37" onClick="form.reset();return false;" class="input1">

</td>

</tr>

</table></td>

</tr>

<tr>

<td height="23" background="images/default_04.gif"></td>

</tr>

</table>

</form>

</body>

</html>

你可能感兴趣的:(JavaScript,html,PHP,css,脚本)