<p>import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public class UserInfoServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {response.setContentType(&quot;text/html;charset=UTF-8&quot;);request.getRequestDispatcher(&quot;userinfo.jsp&quot;).forward(request, response);}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {// Handle the form submission and update the user information}}&lt;%@ page contentType=&quot;text/html;charset=UTF-8&quot; language=&quot;java&quot; %&gt;<!DOCTYPE HTML><html lang="ch"><head><meta charset="utf-8"><link rel="stylesheet" href="css/userinfo.css" /><link rel="stylesheet" href="css/auto.css" /><script src="js/jquery-3.7.0.js"></script><title>userinfo</title><noscript><title>不支持JavaScript,无法显示内容。</title></noscript></head><body onload="bodyload()" ><div id="transparency"><div id="msgs"><div id="headermsg"><div>&lt;img style=&quot;float:left&quot; id=&quot;foreshow&quot; src=&quot;${&quot;image/&quot; + imageId + &quot;.bmp&quot;}&quot; alt=&quot;头像&quot; /&gt;<p style="font-size:30px">${userinfo.name}</p><p style="font-size:15px">粉丝数:${userinfo.fansNum}</p></div><p style="font-size:20px">${userinfo.introduction}</p></div></div><br /><hr style="width:80%" /><p style="font-size:50px;margin-left:10%;">修改个人信息</p><div id="showmsg"><p>手机号:${userinfo.phone}</p><div><label>昵称:${userinfo.name}<br /><input id="name" type="text" placeholder="此处输入你要更改的昵称" /></label><br /><br /><div><span style="vertical-align:top">头像:</span>&lt;img onclick=&quot;nextimg()&quot; id=&quot;image&quot; src=&quot;${&quot;image/&quot; + imageId + &quot;.bmp&quot;}&quot; alt=&quot;头像&quot; /&gt;<br /></div><br /><label>当前简介:${userinfo.introduction}<input id="introduction" type="text" placeholder="此处输入你要更改的简介" onchange="count()" value="" /></label><p id="echotext">已输入0/50字</p><br /><br /><label><input id="submit" type="button" value="提交" onclick="submit()" /></label></div></div><div id="white"></div></div><script src="js/userinfo.js"></script><div hidden="hidden" id="maxarea" value="${maxImageNumber}"></div></body></html></p>

原文地址: https://www.cveoy.top/t/topic/pKVf 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录