2-22学习总结

今天继续学习了idea-mysql的连接增删改查,发现了昨天发研究方向出现了问题。

我又从网上找了一个解析视频剖析了一个简单的增删改查代码,发现之前出的问题大部分是服务器端口问题从而导致了无法运行。

希望明天能自己研究学习一遍增删改查的代码,能在明天解决问题。

<%--
Created by IntelliJ IDEA.
User: Gulu~
Date: 2023/2/20
Time: 17:39
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>用户登录</title>
</head>
<body>
<div style="text-align: center">
<form action="loginjsp.jsp" method="post id=loginForm">
姓名:<input type="text" name="uname" id="uname"> <br>
<span id="msg" style="font-size: 12px;color: red"></span><br>
<button type="button" id="loginBtn">登录</button>
<button type="button">注册</button>
</form>
</div>
</body>
<script type="text/javascript" src="JS/jquery-3.3.1.js"></script>
<script type="text/javascript">

$("#loginBtn").click(function (){
var uname = $("#uname").val();
if(isEmpty(uname)){
$("#msg").html("姓名不能为空");
return;
}
$("#loginForm").submit();

});

function isEmpty(str){
if(str == null || str.trim() == ""){
return true;
}
return false;
}

</script>
</html>
posted @ 2023-02-22 21:11  Y丶FZ  阅读(19)  评论(0)    收藏  举报