论文查询系统(五)
insert
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>论文查询</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <style type="text/css"> * { margin: 0; padding: 0; } * { box-sizing: border-box; } /* body 样式 */ body { font-family: Arial; margin: 0; } /* 标题 */ .header { padding: 80px; text-align: center; color: #1c1c1a; font:24px "华文彩云"; background:url(https://img2.baidu.com/it/u=3353707289,3293241074&fm=253&fmt=auto&app=138&f=JPEG?w=704&h=500); background-size:cover; } /* 标题字体加大 */ .header h1 { font-size: 40px; } /*设置超链接样式*/ table { border-collapse: collapse; border-spacing: 0; } .zuo{ width: 100%; height: 1000px; border-radius:30px; border:10px solid #ffd222; display: inline-block; float: left; position: relative; color: black; font:24px "华文彩云"; background-color:#f3e65d; } p { font-size: 12pt; text-indent: 2em; font:24px "华文行楷"; } input{ outline-style: none ; border: 1px solid #ccc; border-radius: 3px; padding: 13px 14px; width: 620px; font-size: 14px; font-weight: 700; font-family: "Microsoft soft"; } button { /* 按钮美化 */ width: 200px; /* 宽度 */ height: 40px; /* 高度 */ border-width: 0px; /* 边框宽度 */ border-radius: 5px; /* 边框半径 */ background: #28eb0e; /* 背景颜色 */ cursor: pointer; /* 鼠标移入按钮范围时出现手势 */ outline: none; /* 不显示轮廓线 */ font-family: "幼圆"; /* 设置字体 */ color: white; /* 字体颜色 */ font-size: 17px; /* 字体大小 */ } button:hover { /* 鼠标移入按钮范围时改变颜色 */ background: #69fe55; } </style> </head> <body> <% Object message =request.getAttribute("message"); if(message!=null&&!"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%}%> <div class="header"> <h1>论文查询网站</h1> </div> <div class="zuo"> <center> <div align="center"> <h1>添加信息</h1> <p> </p> <p> </p> <a href="index.jsp">返回主页</a> <p> </p> <p> </p> <form action="servlet?method=insert" method="post"> <div> 论文编码:<input type="text" id="id" name="id" /> </div> <p> </p> <p> </p> <div> 论文名称:<input type="text" id="name" name="name" /> </div> <p> </p> <p> </p> <div> 阅读地址::<input type="text" id="pdf" name="pdf" /> </div> <p> </p> <p> </p> <div> 论文作者:<input type="text" id="author" name="author" /> </div> <p> </p> <p> </p> <div> 论文文献:<input type="text" id="title" name="title" /> </div> <p> </p> <p> </p> <div> 论文地址:<input type="text" id="booktitle" name="booktitle" /> </div> <p> </p> <p> </p> <div> 论文日期:<input type="text" id="date" name="date" /> </div> <p> </p> <p> </p> <div> <button type="submit">添 加</button> </div> </form> </div> </center> </div> <!--音乐--> <link rel="stylesheet" href="https://blog-static.cnblogs.com/files/elkyo/APlayer.min.css"> <div id="player" class="aplayer aplayer-withlist aplayer-fixed" data-id="7019693974" data-server="netease" data-type="playlist" data-order="random" data-fixed="true" data-listfolded="true" data-theme="#2D8CF0"></div> <script src="https://blog-static.cnblogs.com/files/elkyo/APlayer.min.js"></script> <script src="https://blog-static.cnblogs.com/files/elkyo/Meting.min.js"></script> <script type="text/javascript"> var body = document.getElementsByTagName('body')[0]; var textArr=["乐观", "❤" ,"积极", "向上", "自由", "正能量","(*^▽^*)", "元气满满", "开心" ,"快乐", "善良", "可爱", "暴富", "暴瘦"]; document.addEventListener('click',(e)=>{ // 生成字符串 var ev = e || window.event; var baseX = ev.pageX; var baseY = ev.pageY; var new_span=document.createElement('span'); new_span.innerText=textArr[parseInt(Math.random()*textArr.length)] new_span.style.position='fixed'; new_span.style.left=baseX-10+'px'; new_span.style.top=baseY+'px'; new_span.style.color='RGB('+parseInt(Math.random()*255)+','+parseInt(Math.random()*255)+','+parseInt(Math.random()*255)+')'; body.appendChild(new_span); // 定时器1实现字符串上升效果 var timer = window.setInterval(()=>{ new_span.style.top=parseInt(window.getComputedStyle(new_span,null)['top'])-2+'px'; // console.log(window.getComputedStyle(new_span,null)['fontSize']); new_span.style.opacity=window.getComputedStyle(new_span,null)['opacity']-0.02; },30); // 定时器2实现字符串消失 window.setTimeout(()=>{ window.clearInterval(timer); body.removeChild(new_span); },1000); },false); </script> <hr /> </body> </html>
list
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>论文查询</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <style type="text/css"> * { margin: 0; padding: 0; } * { box-sizing: border-box; } /* body 样式 */ body { font-family: Arial; margin: 0; } /* 标题 */ .header { padding: 80px; text-align: center; color: #1c1c1a; font:24px "华文彩云"; background:url(https://img2.baidu.com/it/u=3353707289,3293241074&fm=253&fmt=auto&app=138&f=JPEG?w=704&h=500); background-size:cover; } /* 标题字体加大 */ .header h1 { font-size: 40px; } /*设置超链接样式*/ table { border-collapse: collapse; border-spacing: 0; } .zuo{ width: 100%; height: 1000px; border-radius:30px; border:10px solid #ffd222; display: inline-block; float: left; position: relative; color: black; font:24px "华文彩云"; background-color:#f3e65d; } p { font-size: 12pt; text-indent: 2em; font:24px "华文行楷"; } input{ outline-style: none ; border: 1px solid #ccc; border-radius: 3px; padding: 13px 14px; width: 620px; font-size: 14px; font-weight: 700; font-family: "Microsoft soft"; } button { /* 按钮美化 */ width: 200px; /* 宽度 */ height: 40px; /* 高度 */ border-width: 0px; /* 边框宽度 */ border-radius: 5px; /* 边框半径 */ background: #28eb0e; /* 背景颜色 */ cursor: pointer; /* 鼠标移入按钮范围时出现手势 */ outline: none; /* 不显示轮廓线 */ font-family: "幼圆"; /* 设置字体 */ color: white; /* 字体颜色 */ font-size: 17px; /* 字体大小 */ } button:hover { /* 鼠标移入按钮范围时改变颜色 */ background: #69fe55; } </style> </head> <body> <% Object message =request.getAttribute("message"); if(message!=null&&!"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%}%> <div class="header"> <h1>论文查询网站</h1> </div> <div class="zuo"> <div align="center"> <h1 >信息列表</h1> <a href="index.jsp">返回主页</a> <table > <tr> <td>论文编码:</td> <td>论文名称:</td> <td>阅读地址:</td> <td>论文作者:</td> <td>论文文献:</td> <td>论文地址:</td> <td>论文日期:</td> <td align="center" colspan="2">操作</td> </tr> <c:forEach items="${list}" var="item"> <tr> <td>${item.id}</td> <td>${item.name}</td> <td>${item.pdf}</td> <td>${item.author}</td> <td>${item.title}</td> <td>${item.booktitle}</td> <td>${item.date}</td> <td><a href="update.jsp?id=${item.id}&name=${item.name}&pdf=${item.pdf}&author=${item.author}&title=#{item.title}&booktitle=#{item.booktitle}&date=#{date}">修改</a></td> <td><a href="servlet?method=delete&id=${item.id}">删除</a></td> </tr> </c:forEach> </table> </div> </div> <!--音乐--> <link rel="stylesheet" href="https://blog-static.cnblogs.com/files/elkyo/APlayer.min.css"> <div id="player" class="aplayer aplayer-withlist aplayer-fixed" data-id="7019693974" data-server="netease" data-type="playlist" data-order="random" data-fixed="true" data-listfolded="true" data-theme="#2D8CF0"></div> <script src="https://blog-static.cnblogs.com/files/elkyo/APlayer.min.js"></script> <script src="https://blog-static.cnblogs.com/files/elkyo/Meting.min.js"></script> <script type="text/javascript"> var body = document.getElementsByTagName('body')[0]; var textArr=["乐观", "❤" ,"积极", "向上", "自由", "正能量","(*^▽^*)", "元气满满", "开心" ,"快乐", "善良", "可爱", "暴富", "暴瘦"]; document.addEventListener('click',(e)=>{ // 生成字符串 var ev = e || window.event; var baseX = ev.pageX; var baseY = ev.pageY; var new_span=document.createElement('span'); new_span.innerText=textArr[parseInt(Math.random()*textArr.length)] new_span.style.position='fixed'; new_span.style.left=baseX-10+'px'; new_span.style.top=baseY+'px'; new_span.style.color='RGB('+parseInt(Math.random()*255)+','+parseInt(Math.random()*255)+','+parseInt(Math.random()*255)+')'; body.appendChild(new_span); // 定时器1实现字符串上升效果 var timer = window.setInterval(()=>{ new_span.style.top=parseInt(window.getComputedStyle(new_span,null)['top'])-2+'px'; // console.log(window.getComputedStyle(new_span,null)['fontSize']); new_span.style.opacity=window.getComputedStyle(new_span,null)['opacity']-0.02; },30); // 定时器2实现字符串消失 window.setTimeout(()=>{ window.clearInterval(timer); body.removeChild(new_span); },1000); },false); </script> <hr /> </body> </html>
update
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>论文查询</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <style type="text/css"> * { margin: 0; padding: 0; } * { box-sizing: border-box; } /* body 样式 */ body { font-family: Arial; margin: 0; } /* 标题 */ .header { padding: 80px; text-align: center; color: #1c1c1a; font:24px "华文彩云"; background:url(https://img2.baidu.com/it/u=3353707289,3293241074&fm=253&fmt=auto&app=138&f=JPEG?w=704&h=500); background-size:cover; } /* 标题字体加大 */ .header h1 { font-size: 40px; } /*设置超链接样式*/ table { border-collapse: collapse; border-spacing: 0; } .zuo{ width: 100%; height: 1000px; border-radius:30px; border:10px solid #ffd222; display: inline-block; float: left; position: relative; color: black; font:24px "华文彩云"; background-color:#f3e65d; } p { font-size: 12pt; text-indent: 2em; font:24px "华文行楷"; } input{ outline-style: none ; border: 1px solid #ccc; border-radius: 3px; padding: 13px 14px; width: 620px; font-size: 14px; font-weight: 700; font-family: "Microsoft soft"; } button { /* 按钮美化 */ width: 200px; /* 宽度 */ height: 40px; /* 高度 */ border-width: 0px; /* 边框宽度 */ border-radius: 5px; /* 边框半径 */ background: #28eb0e; /* 背景颜色 */ cursor: pointer; /* 鼠标移入按钮范围时出现手势 */ outline: none; /* 不显示轮廓线 */ font-family: "幼圆"; /* 设置字体 */ color: white; /* 字体颜色 */ font-size: 17px; /* 字体大小 */ } button:hover { /* 鼠标移入按钮范围时改变颜色 */ background: #69fe55; } </style> </head> <body> <% Object message =request.getAttribute("message"); if(message!=null&&!"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%}%> <div class="header"> <h1>论文查询网站</h1> </div> <div class="zuo"> <div align="center"> <h1>修改信息</h1> <p> </p> <p> </p> <a href="index.jsp">返回主页</a> <p> </p> <p> </p> <form action="servlet?method=update" method="post"> <div> 论文编码:<input type="text" id="id" name="id" /> </div> <p> </p> <p> </p> <div> 论文名称:<input type="text" id="name" name="name" /> </div> <p> </p> <p> </p> <div> 阅读地址::<input type="text" id="pdf" name="pdf" /> </div> <p> </p> <p> </p> <div> 论文作者:<input type="text" id="author" name="author" /> </div> <p> </p> <p> </p> <div> 论文文献:<input type="text" id="title" name="title" /> </div> <p> </p> <p> </p> <div> 论文地址:<input type="text" id="booktitle" name="booktitle" /> </div> <p> </p> <p> </p> <div> 论文日期:<input type="text" id="date" name="date" /> </div> <p> </p> <p> </p> <div> <button type="submit">修 改</button> </div> </form> </div> </div> <!--音乐--> <link rel="stylesheet" href="https://blog-static.cnblogs.com/files/elkyo/APlayer.min.css"> <div id="player" class="aplayer aplayer-withlist aplayer-fixed" data-id="7019693974" data-server="netease" data-type="playlist" data-order="random" data-fixed="true" data-listfolded="true" data-theme="#2D8CF0"></div> <script src="https://blog-static.cnblogs.com/files/elkyo/APlayer.min.js"></script> <script src="https://blog-static.cnblogs.com/files/elkyo/Meting.min.js"></script> <script type="text/javascript"> var body = document.getElementsByTagName('body')[0]; var textArr=["乐观", "❤" ,"积极", "向上", "自由", "正能量","(*^▽^*)", "元气满满", "开心" ,"快乐", "善良", "可爱", "暴富", "暴瘦"]; document.addEventListener('click',(e)=>{ // 生成字符串 var ev = e || window.event; var baseX = ev.pageX; var baseY = ev.pageY; var new_span=document.createElement('span'); new_span.innerText=textArr[parseInt(Math.random()*textArr.length)] new_span.style.position='fixed'; new_span.style.left=baseX-10+'px'; new_span.style.top=baseY+'px'; new_span.style.color='RGB('+parseInt(Math.random()*255)+','+parseInt(Math.random()*255)+','+parseInt(Math.random()*255)+')'; body.appendChild(new_span); // 定时器1实现字符串上升效果 var timer = window.setInterval(()=>{ new_span.style.top=parseInt(window.getComputedStyle(new_span,null)['top'])-2+'px'; // console.log(window.getComputedStyle(new_span,null)['fontSize']); new_span.style.opacity=window.getComputedStyle(new_span,null)['opacity']-0.02; },30); // 定时器2实现字符串消失 window.setTimeout(()=>{ window.clearInterval(timer); body.removeChild(new_span); },1000); },false); </script> <hr /> </body> </html>