var code = request.getSession.getAttribute("code");
我在js的方法中加了这句话,想获取后台传来的code,然后引入的js就都失效了,注掉之后就可以正常运行
求大神解答。
public String mailcode(String mail,HttpServletRequest request) throws Exception{
        RegisterPojo registerPojo = registerService.findBymail(mail);
        if(registerPojo == null){
            //生成四位随机数字
            Random random = new Random();
            int code = random.nextInt(9999-1000+1)+100;
            String mailcode = String.valueOf(code);
            Main.main(mail, mailcode);
            HttpSession session = request.getSession();
            session.setAttribute("code", mailcode);
             return mailcode;
        }
            return "";
            
    }
                            
                                    Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
需要看看你的报错信息