java代碼實現H5頁面


   public void getH5(HttpServletResponse response){

        StringBuffer res=new StringBuffer();
        res.append("<!Doctype html>");
        res.append("<html lang='zh-cn'>");
        res.append("<head><mate charset='utf-8'/><title>這是標題欄</title></head><body>");
        StringBuffer stringBuffer=new StringBuffer();
        stringBuffer.append("這是body中的內容內容");
        res.append(stringBuffer.toString());
        res.append("</body></html>");
        response.addHeader("content-type","text/html; charset=utf-8");
    }

原理什么的后面整理,先把代碼貼上


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM