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);
        };
  • 相关阅读:
    mysql_单表查询
    mysql_建表
    MySQL基础
    JS_左边栏菜单
    Vue框架之组件系统
    Vue常用语法及命令
    Django的缓存,序列化,ORM操作的性能
    Django中的form表单
    Django中的auth模块
    AJAX请求提交数据
  • 原文地址:https://www.cnblogs.com/chenghaixiang/p/14911742.html
Copyright © 2011-2022 走看看