📄 index.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'Index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body bgcolor="#50DBD6">
<h2 align="center">用户登陆</h2>
<table align="center">
<form id = "form1" name = "form1" action="Index" method="POST" onsubmit="return _onclick()">
帐号:<input type="text" name="id" size="30" onblur="_clicklogin()" value=""><br>
密码:<input type="password" name="password" size="30" onblur="_clicklogin()"><br><br>
<input type="radio" name="radiobutton" value="admin" />管理员
<input type="radio" name="radiobutton" value="headteacher"/>班主任
<input type="radio" name="radiobutton" value="teacher" />老师
<input type="radio" name="radiobutton" value="student" checked="checked"/>学生<br><br>
<input type="submit" name="submit" value="提交"/>
<input type="reset" value="重置"/>
</form>
</table>
</body>
</html>
<script type="text/javascript">
<!--
function _onclick()
{
var password = document.getElementById("password").value;
var id = document.getElementById("id").value;
if(password=="" || id=="")
{
alert("帐号密码不能为空!");
return false;
}
else
{
return true;
}
}
//-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -