<%@ page import="java.util.Calendar" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta charset="UTF-8"> <title>实验报告</title> <style> html,body{ height: 100%; } * { box-sizing: border-box; } body { margin: 0; font-family: Arial, Helvetica, sans-serif; background-color: #e6e6e6; } .container { max-width: 50%; margin: 0 auto; padding: 20px; background-color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); } h1 { text-align: center; margin-top: 0; padding-top: 50px; font-size: 36px; color: #4CAF50; } form label { display: block; margin-bottom: 5px; color: #333; font-weight: bold; } form input[type='text'], form input[type='email'], form input[type='file'], form textarea { width: 100%; margin-bottom: 20px; border: none; background-color: #f2f2f2; padding: 12px; border-radius: 5px; font-size: 20px; color: #333; } form input[type='submit'] { background-color: #4CAF50; color: #fff; border: none; padding: 12px 24px; cursor: pointer; font-size: 18px; border-radius: 5px; transition: background-color 0.3s ease; } form input[type='submit']:hover { background-color: #3e8e41; } .success-message, .error-message { display: none; margin-top: 20px; padding: 10px; border-radius: 5px; font-size: 18px; text-align: center; } .success-message { background-color: #4CAF50; color: #fff; } .error-message { background-color: #f44336; color: #fff; } </style> </head> <% String id_=request.getParameter("id_"); String exp_id=request.getParameter("exp_id"); String les_id=request.getParameter("les_id"); %> <body> <div class="container"> <h1>实验报告</h1> <form id="report-form" action="control_stu.jsp" method="post" enctype="multipart/form-data"> <input type="hidden" value="Submit_experiment" name="To"> <input type="hidden" value=<%=id_%> name="id_"> <input type="hidden" value=<%=les_id%> name="les_id"> <input type="hidden" value=<%=exp_id%> name="exp_id"> <label for="report">请选择实验报告文件:</label> <input type="file" id="report" name="file"> <label for="content">实验报告内容:</label> <textarea id="content" name="value" rows="10" style="resize: none" required></textarea> <input type="submit" value="提交"> </form> <div class="success-message" id="success-message">提交成功!</div> <div class="error-message" id="error-message">提交失败,请稍后再试!</div> </div> </body> </html>
标签:总结,form,color,border,31,23.5,background,font,margin From: https://www.cnblogs.com/laobing6214/p/17447472.html