255) fc=255; if(bc>255) bc=255; int r=fc random.nextInt(bc-fc); int g=fc random.nextInt(bc-fc); int b=fc random.nextInt(bc-fc); return new Color(r,g,b); } %>
页面引用:
JS:
this.src='https://resources.devmax.cn/uploads/20230211/2027e548afe0540c99d519c7224c2cbf.jpg?' Math.random();
登陆时候获取验证码:
String randb = (String) request.getSession().getAttribute("rand");
