今天是10月25日,又一个星期天……见怪不怪了
今天学习了MySQL的删除和修改语句,另外还想用查询语句中的Select count(*)语句写一个登录试试看
代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<title>添加课程</title>
<script type="text/javascript">
function checkaccount() {
var x=document.getElementById("account").value;
if(x.length>20) {
alert("用户账户位数不能大于20")
document.getElementById("account").value = "";
}
}
function checkpwd() {
var x=document.getElementById("password").value;
if(x.length>20) {
alert("密码最大只有20位")
document.getElementById("password").value = "";
}
}
function Checka(){
var Username = document.getElementById("account").value;
if (Username == "" || account.value == null ) {
alert("用户名不能为空");
}
}
function Checkp(){
var Username = document.getElementById("password").value;
if (Username == "" || password.value == null ) {
alert("密码不能为空");
}
}
</script>
</head>
<body style="text-align:center;">
<br><br><br>
<form name="form2" action="Next1.jsp" method="post">
学号 <input type="text" name="account" id="account" onblur="checkaccount()"><br><br>
密码 <input type="password" name="password" id="password" onblur="checkpwd()"><br><br>
<input type="submit" value="登录">
</form>
</body>
</html>
使用效果:

这样就可以跳转到主页面啦

好,今天就先这样吧!