效果:
相关代码:
- login.jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>企业系统管理_登录</title>
<script type="text/javascript">
function loginClick() {
var name=document.login.username.value;
var pwd=document.login.password.value;
if(name==null||name.length==0){
alert("用户名不能为空!");
return false;
}
if(pwd==null||pwd.length==0){
alert("密码不能为空!");
return false;
}
}
</script>
</head>
<body>
<div id="header">
<h1>企业信息管理系统</h1>
</div>
<div id="nav">
</div>
<div id="section">
<form action="welcome.jsp" method="post" onsubmit="return loginClick()" >
<table class="login">
<tr>
<td height="100%">
<tr>
<td width="66" height="20">用户名:</td>