zoukankan      html  css  js  c++  java
  • 每日总结

    1.今天继续安卓关于http的学习

    通过refresh响应头,让浏览器隔几秒后跳转至别的页面:

    public class ServletFour extends HttpServlet {
        public int second = 0;
        @Override
        protected void doGet(HttpServletRequest req, HttpServletResponse resp)
                throws ServletException, IOException {
            //1.浏览器每隔2秒定时刷新页面
    //        resp.setHeader("refresh", "2");
    //        resp.getWriter().write(++second + "");
    //        System.out.println("doGet方法被调用~");
            
            //2.进入页面5s后,然页跳到百度~
            resp.setHeader("refresh", "5;url='http://www.baidu.com'");
            resp.getWriter().write("HE HE DA~");
        }
        
        protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException ,IOException 
        {
            doGet(req, resp);
        };
  • 相关阅读:
    力扣背包型动态规划
    并查集
    位运算题目
    随机采样题目
    单调栈题目
    前缀和题目
    贪心题目
    堆排序
    python装饰器
    状态机题目
  • 原文地址:https://www.cnblogs.com/chenghaixiang/p/14911742.html
Copyright © 2011-2022 走看看